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

Time difference question...

Status
Not open for further replies.

grom71

IS-IT--Management
Oct 23, 2003
56
GB
Hi all,
I've created a report which I want to show all records from a database between 7pm last night, and 9am this morning.
My date/time field is such {14/03/2005 19.00.00} as an example.
Furthermore I planning to run the report automcatically every day at 9.30am using some scheduling software so I need it to get the correct records.
Does anyone have an easy way of doing this ?
Any help greatly appreciated....:)
Steve
 
With Crystal 8.5, I use the following if the field is a datetime field

Code:
{TABLE.DATE} IN [datetime((currentdate - 1),time(19,0,0)) TO datetime(currentdate,time(9,0,0))

Cheers,
-LW

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top