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!

Crystal 8.0 Date Field Help

Status
Not open for further replies.

Janes

MIS
Mar 7, 2002
4
US
I have a report that I need to create using Crystal 8.0, one of my fields is a date and time field. I need to use a date range and only pickup records for specific times. Example:

07/01/2003 12:00 am to 09/23/2003 5:00 am, I only want the records that qualify these times. I cannot figure out how to do this.
 
Write a record selection formula:

{YourDateTimeField} in datetime(2003,7,1,12,0,0) to datetime(2003,9,23,5,0,0)

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Tried this and it did not give me the records that I was looking for. If I only want records posted from 12:00 am to 5:00am starting on 7/1 5:00 am each day thru 9/23 12:00 am, only want to see the records that qualify from day to day between 12:00 am and 5:00 am.
 
So if a record had a time stamp of 6:00am, and a date of 7/31/03, it should not be included because only one condition (the date) has been met? Is that correct?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Yes, what I am trying to do is only show the records for each day starting at 12:00 am and ending at 5:00 am for a date range. I do not want records before 12:00 am or after 5:00 am. I need 90 days of data.
 
Something like this should work for a 90-day period:

date({table.datetime}) in dateadd("d", -89, {?date}) to {?date} and
time({table.datetime}) in time(00,00,00) to time(05,00,00)

where {?date} is a date-type discrete parameter.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top