Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting from utc for sql insert

Status
Not open for further replies.

ozpeppers

Programmer
Jul 17, 2001
32
BN
Hi,

I'm trying to insert a date/time into sql 7.

The problem is that the variable holding the date/time is in utc format.

Does anyone know how to get around this problem?

Thanks in advance

Mark
 
I found this (on Google):

New: CURRENT UTC TIMESTAMP special value.
Combines CURRENT DATE and CURRENT TIME, adjusted by the server's time zone adjustment value, to form a Coordinated Universal Time (UTC) TIMESTAMP value containing the year, month, day, hour, minute, second and fraction of a second. This feature allows data to be entered with a consistent time reference, regardless of the time zone in which the data was entered.

SELECT CURRENT TIMESTAMP,
CURRENT UTC TIMESTAMP,
PROPERTY ( 'TimeZoneAdjustment' );

-- Result: 2001-12-30 10:51:37.012 2001-12-30 15:51:37.012 -300
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top