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!

SQL query fails after date request from ASP page

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
Hi guys,

I have a problem with a page where I request a StartDate and an EndDate for an online report. However when the dates are the same or the EndDate is blank and defaults to the StartDate, the SQL query won't work. I assum this is because the time portion of the date fields defaults to 12:00:00AM and therefore the result is null. How can I adjust to make the EndDate time portion default to 11:59:59 PM? I tried adding the time on at then end...

ie EndDate = EndDate & "11:59:59 PM" but this doesn't seem to work for the query. I am using an Oracle DB to query from.

Any suggestions??

Bastien
 
FoxBox,

The link you provided is for the Convert function of TSQL, which is used with SQLS, while he specifically sited he was using Oracle. While Oracle SQL does include a Convert function, it's not used to convert data to different datatypes, as the TSQL Convert function is. IIRC, it's used to convert character data between different character sets, such as EBCDIC, ASCII, etc...

Bastien,

See thread333-79000 Jon Hawkins
 
You are right.


>I am using an Oracle DB to query from.
i missed that.



br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top