Where's GETUTCDATE()?
Nov 14, 2007
So I inherited an application that currently serializes it's data to/from XML. I have started on the path down to using SQL CE instead.
Because we need to work across time zones, we like to store all our times as UTC, with occasional exceptions. I was looking forward to simplifying some of my code, and use GETUTCDATE() inside my INSERT/UPDATE queries instead of instantiating datetime objects in code and passing them in as parameters. Imagine my surprise when I discovered that there ain't no such function (which I use all the time on the server end of our application)!
Am I really the first person to wonder about this ?
Can we please get GETUTCDATE() ? Of all the potential feature requests, this would have to be one of the most trivial to implement
regards,
Ryan
View 5 Replies
Jan 31, 2008
I am testing out VS2008, .NET CF 3.5, and SQL CE 3.5 using Merge Replication with SQL 2005 Server. I am getting an error when SQL CE attempts to subscribe to the publication that says SQL CE 3.5 doesn't recognize the function getutcdate(). In the publication there are some tables that have row insert timestamp columns which have getutcdate() listed as the default value.
This error was never a problem under SQL CE 3.0, am I correct in guessing that it is the default value of these row insert timestamp columns that SQL CE 3.5 is complaining about, and if so, what has changed and is there any way around it short of removing the default values from these columns?
View 7 Replies
View Related
Nov 8, 2007
Hi guys,
I have an event log table with a key-column type of datetime. The value in the key column is configured such as the default value is GETUTCDATE() that way everytime I get a new event the table timestamps it automatically. The problem is, the default format for my datetime column does not include milliseconds. Events can happen during the same second generating duplicated primary keys. Is there an easy way to format the datetime column so it includes millisencods for GETUTCDATE() ?.
Kind regards,
View 2 Replies
View Related
Nov 6, 2006
During this latest time change, the value of getutcdate() was offset by one hour as called from SQL Server. True UTC time should never be impacted (or changed) by any Daylight Savings Time activity. This is likely not an OS issue, since IIS logs did show the correct UTC time (unchanging) during the DST time change.
Here is a record of how the time change was handled by a running SQL 2000 sp4 Server as these functions were called:
getutcdate() = Oct 29 2006 5:50AM //ran at the same time as// getdate() = Oct 29 2006 1:50AM
getutcdate() = Oct 29 2006 7:05AM //ran at the same time as// getdate() = Oct 29 2006 2:05AM
@@Version=Microsoft SQL Server 2000 - 8.00.2040 (Intel X86) May 13 2005 18:33:17 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Thanks -
View 3 Replies
View Related