system
February 8, 2017, 11:13pm
1
Hello All,
Can anyone please help me on how to convert the ADS_EVENT.Start_Time of auditing.unx from GMT to CST?
Auditing database is SQL Server 12
I could find it for Oracle and Mysql but not for SQL Server
Thanks in Advance!!
boxiadmin (BOB member since 2007-03-09)
system
February 9, 2017, 8:18am
2
As a Brit I have no idea what CST actually is, but assuming it’s just a matter of adding or subtracting hours, can’t you just use DATEADD with an hh argument?
Debbie
Debbie (BOB member since 2005-03-01)
system
February 9, 2017, 12:51pm
3
CST is Central Standard time which they use in Central America
surya_sudheer (BOB member since 2006-11-01)
system
February 9, 2017, 1:11pm
4
system
February 9, 2017, 6:10pm
5
Thanks Mak. I figured it out with the link you sent.
In case anyone needs it in a hurry:
dateadd(hour,-datediff(hour,getdate(),getutcdate()),ADS_EVENT.Start_Time)
where ADS_EVENT.Start_Time is the Audit.unx column.
boxiadmin (BOB member since 2007-03-09)
system
February 15, 2017, 10:15am
6
Thanks for the update! 8)
Mak 1 (BOB member since 2005-01-06)