Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieving data within a 24 hour period

Status
Not open for further replies.

rorymo

Technical User
Nov 7, 2003
75
US
Hi,
I am using Crystal Reports v. 10 on Sql Server db.
I am trying to devise a formula that will pull data
beginning at 1:45 pm the previous day through 1:45 pm current day.
I tried CurrentDate -1 but I'm not sure how to specify the start time to be 1:45 pm on the previous day.

Thanks in advance for any help!
rorymo
 
In your record selection criteria, try this:

{table.field} in dateadd("n",45,dateadd("h",13,currentdate-1)) to dateadd("n",45,dateadd("h",13,currentdate))

~Brian
 
I have this in several of my 8.5 reports
Code:
{table.field} in 
datetimevalue(currentdate - 1,timevalue(01,45,00)) to_ datetimevalue(currentdate,timevalue(01,45,00))

Cheers,
-LW
 
Thank you Brian and LW.
rorymo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top