Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20490

How to convert UTC date to local time in an alert message

$
0
0


What is the SQL syntax to convert a UTC date/time, such as in the datetime field for a unDP (universal device poller)?  I keep getting:

 

MACRO SQL ERROR - Incorrect syntax near '7'.

for this statement:

Local time:  ${SQL:Select DATEADD(hh,DATEDIFF(hh, GETUTCDATE(), GETDATE()),('''' + ${CustomPollerStatus.DateTime} + ''''))}

 

unDP Taken (UTC time): 11/19/2013 7:45:30 PM

I realize it doesn't like the blank, and I need quote marks around the date so it treats it as an entire string, but I'm having trouble coming up with the right syntax.


Viewing all articles
Browse latest Browse all 20490

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>