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!

Formula for past 24 hours

Status
Not open for further replies.

granny1

Technical User
Jun 24, 2001
24
US
I need help with a formula for all events that have occured within the past 24 hours. If I use Current Date -1 I get duplicate data.
 
What is your record selection formula?
By "duplicate data", do you mean two copies of each record, or records for two full days, or something else?
 
WHEN I DO {LSC-MIS_Operations.Create-date}>= CurrentDate -1
MY REPORT SHOWS DATA FOR THE 16TH AND THE 17TH THE NEXT TIME IT RUNS IT SHOWS THE 17TH DATA AGAIN PLUS DATA FOR THE 18TH
 
That sounds correct. The "past 24 hours" would include some records from today and some from yesterday. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
If you have a DateTime field you could try:

CurrentDatetime - 1 Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Thanks for the information Currentdatetime corrected my problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top