Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 1st, 2004, 08:19 AM
chelleybaby chelleybaby is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 20 chelleybaby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Query a time?? URGENT!

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!

Reply With Quote
  #2  
Old April 1st, 2004, 02:23 PM
rmarsha rmarsha is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 14 rmarsha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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')"

Reply With Quote
  #3  
Old April 1st, 2004, 02:53 PM
rmarsha rmarsha is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 14 rmarsha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Query a time?? URGENT!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway