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

Re: DateTime SWQL Question

$
0
0

Hi,

you are right SWQL doesn't support MODULO operator. But you can still do it self

 

SELECT

    ToString( Ceiling( (HourDiff(MAX (EventTime ), GETUTCDATE()) / 24.0 - Floor(HourDiff(MAX ( EventTime ), GETUTCDATE ()) / 24.0) ) * 24 )) + ' Hours ' AS Hours

FROM Orion.Events

 

 

In SWQL use almost always GETUTCDATE since it's default time kind we work with.

 

 

Thanks

ET;


Viewing all articles
Browse latest Browse all 20607

Trending Articles



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