Home » SQL & PL/SQL » SQL & PL/SQL » Re: Help oracle date problem
Re: Help oracle date problem [message #22316] Thu, 03 October 2002 09:39
MikeT
Messages: 11
Registered: August 2002
Junior Member
Apparently, d5 isn't converting properly. If you haven't already, do a Response.Write(sSQL2) before you execute the SQL. Once you see what your ASP page is passing, you can figure out how to reformat it in a way Oracle likes. Try copying the SQL and running it right in Oracle and keep playing with d5 until Oracle likes the query.

Here are a few things you can try:

Add tic marks around the d5:

sSQL2 = "SELECT WO_WORKORD, WO_START_DT FROM WO_REC WHERE WO_START_DT = '"& d5 &"'"

Use the DateAdd function:

d5 = DateAdd("D", 1, Date)

Use the Now instead of Date:

d5 = DateAdd("D", 1, Now)

Reorder d5(your default date may be a diff format on Oracle):

d5 = DatePart("YYYY",Date) & "/" & DatePart("M",Date) & "/" & DatePart("D",Date)

Hope that helps...

FYI, for ASP and ASP related DB questions, try this site: http://www.aspmessageboard.com/
Previous Topic: violated
Next Topic: rownum and an order by clause
Goto Forum:
  


Current Time: Mon May 06 22:15:56 CDT 2024