If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to select a time that is within a interval?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-23-04, 05:36
kuzze kuzze is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Question How to select a time that is within a interval?

Hi!

If i have a time and date i an database and want to check if that time and date are within a specified time interval

like if 2004-08-23 11:00 is within 2004-80-22:11:00 -> 2004-08-24 10:00

how do i do this?

Last edited by kuzze; 08-23-04 at 05:40.
Reply With Quote
  #2 (permalink)  
Old 08-23-04, 08:12
kuzze kuzze is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
I solved it by using BETWEEN

Select ColumnName from TableName where DateColumnName BETWEEN '2004-80-22:11:00' AND '2004-08-24 10:00'

Thanks to Vijay G
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On