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

Date Ranges 1

Status
Not open for further replies.

kbfnet

Programmer
Nov 16, 2004
28
US
Hello,

I am using a date range of 04/07/2005 to 04/13/2005. I am selecting my date range using the select expert and I am using "EODDATE" is between 04/07/2005 and 04/13/2005. Using this date range I ONLY get back data from 04/13/2005 instead of the entire week. Can anyone think of what I might be overlooking which is causing this to happen?

Thanks,
Kbfnet
 
Are the dates in Database->Show SQL Query?

The Select expert should look like the following

Code:
{table.EODDATE} in date(2005,4,7) to date(2005,4,13)

 
Yes the SQL does look like that but with a time attached. So its (2005,4,7 12:00:00 PM) to date (2005,4,13 12:00:00 PM)

The time is not important to me and when I tried to eliminate it I still got the same results.
 
On my Show SQL in CR 8.5 with an Oracle DB, my dates come back as

Code:
table.eoddate >= {ts '2003-04-07 00:00:00.00'} AND
table.eoddate < {ts '2003-04-14 00:00:00.00'}

In the event {table.eoddate} is a datetime, you might want to change it to

Code:
{table.EODDATE} in datetime(2005,4,7,0,0,0) to_ datetime(2005,4,14,0,0,0)

Notice the to_ This means to exclude the ending date

-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top