cancel
Showing results for 
Search instead for 
Did you mean: 

Data for current hour

Former Member
0 Kudos
186

Hello,

I am trying to use a query to get data from our database for the current hour.

I am using the below for an existing report for previous hour.

{TTID_129L3597.Rn_Create_Date} in dateadd("h",-1,dateadd("n",-minute(currentdatetime),dateadd("s",-second(currentdatetime),currentdatetime))) to

dateadd("n",-minute(currentdatetime),dateadd("s",-second(currentdatetime),currentdatetime))

Is there any simpler formulas that can be used to get data created during the current hour?

Thanks,

Joe

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The logic would be the same but if you are looking to fetch data for the current hour then try this:


date({TTID_129L3597.Rn_Create_Date}) = currentdate and
time({TTID_129L3597.Rn_Create_Date}) in 
time(hour(currenttime),0,0) to time(hour(currenttime),59,59);

Edited by: Sanjay Kodidine on Jun 18, 2009 7:14 AM

Answers (0)