GMT to CST

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 :nonod:

Thanks in Advance!!


boxiadmin :us: (BOB member since 2007-03-09)

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 :uk: (BOB member since 2005-03-01)

CST is Central Standard time which they use in Central America


surya_sudheer :india: (BOB member since 2006-11-01)

Plenty on Google.

Have to be careful with day light saving though.

https://www.google.co.uk/?gfe_rd=cr&ei=l2mcWLWqFKes8wfByrOYCw&gws_rd=ssl#q=converting+GMT+to+CST+in+SQL+Server


Mak 1 :uk: (BOB member since 2005-01-06)

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 :us: (BOB member since 2007-03-09)

Thanks for the update! 8)


Mak 1 :uk: (BOB member since 2005-01-06)