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

Specific Date Error

Status
Not open for further replies.
Apr 25, 2001
18
US
Whenever I try to select records by a specific date I get no data returned. If I use the between date function everything is fine. If I use after but before, I get data returned. It's only when I pull from the date specifically. This just started happened. I tried reloading Crystal but it didn't help. I'm using V8.0. Any insight would be greatly appreciated.
 
I would check out your file options. On the Reporting tab, under 'When Reading Data' you may need to select the Convert to Date option for the Date-Time field.
 
I've done that and everything is as it should be there. The odd thing is if I search for a date, for example:after 5/28/01 and before 5/30/01 it will return the 29th's data but if I search for 5/29/01 I get blanks.
 
This problem usually happens because there is a time value associated with the date. Try creating a couple of formulas, one that gets the date only, and one that gets the time only, just to see what is happening.
DateValue({YourField}) //Date formula
TimeValue({YourField}) //Time formula
Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
It's a SQL 7.0 database and I have re-indexed. I tryed doing a time value only and it worked. Any ideal on the fix to get it to accept dates as well? Thanks.
 
I suspect that when you ask for 5/28/01 to 5/29/01, you want 5/28/01 00:00:00 to 5/29/01 23:59:59,
not 5/28/01 00:00:00 to 5/29/01 00:00:00.
Is that the problem? Malcolm Wynden
Authorized Crystal Engineer
malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top