|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
In my asp page, when i key in the below codes,
i am returned what i am looking for. sqlString = "SELECT userid FROM event WHERE signupdate BETWEEN '31 MAR 2004' AND '02 APR 2004'" However, when i wish to add a specific time, like the code below, i am not returned with anything. I am very sure that between this time period, there is a userid that should be returned. Is the format for time wrong? sqlString = "SELECT userid FROM event WHERE signupdate BETWEEN '31 MAR 2004 00:00:00' AND '02 APR 2004 00:00:00'" Thanks! |
|
#2
|
|||
|
|||
|
Not sure if you can query using the month abbreviation, but I'm pretty sure this will work:
sqlString = "SELECT userid FROM event WHERE signupdate BETWEEN to_date('31 MARCH 2004 00:00:00', 'dd Month yyyy hh:mi:ss') AND to_date('02 APRIL 2004 00:00:00', 'dd Month yyyy hh:mi:ss')" |
|
#3
|
|||
|
|||
|
Looks like you can get the abbreviated month by using 'MON' instead of 'MONTH'
found a good page for using to_date: http://www.techonthenet.com/oracle/...ons/to_date.htm |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Query a time?? URGENT! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|