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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yesterday's Date to the Current Report RunDate

Status
Not open for further replies.

frieb

Technical User
Aug 8, 2005
13
US
Need help with Date Forumula: Need Yesterday's data up to the time the report is run the next day. For example: Report is Run Today (8/8/05) @ 7:00 AM. The report needs to return records for 8/7 (24 hours) and 8/8 (7 hours.)

Crystal 10, SQL Database
 
Then find out yesterdays date using

set YesterdayDate = dateadd (dd, getdate() , -1)

then just select where RecordDate >= YesterdayDate

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
You should be able to use:

{table.date} >= currentdate - 1

-LB
 
If you need time value, then try this

Code:
{table.date} in datetimevalue(currentdate - 1,timevalue(00,00,00)) to_ datetimevalue(currentdate,timevalue(07,00,00))

-lw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top