SAW56
asked on
Creating a date range formula
I am creating a crystal report and need to know how to pull a date range of 2:00PM yesterday to 4:00AM Current Date.
create your paramters to be datetime
without parameter:
on your select expert click new then choose your date.field
choose the is between and choose your start date and end date
date.jpg
on your select expert click new then choose your date.field
choose the is between and choose your start date and end date
date.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you simply want to always run from 4 pm yesterday to 2 am today, then you can use this logic in your record selection formula:
{table.datetimefield} in datetime(currentdate-1,tim e(16,0,0)) to datetime(currentdate,time( 2,0,0))
{table.datetimefield} in datetime(currentdate-1,tim
I guess I should have refreshed the page before posting.
mlmcc, I guess we had the exact same solution.
mlmcc, I guess we had the exact same solution.
Except I had the times screwed up...
ASKER
Thanks for all your help....it worked perfectly
{date.field} in {?Startdate} to {?endDate}
?startdate
?enddate is your parameter