RE: select rows by compare on datetime column - more on time decrement

2004-08-18 Thread Viswanatha Rao
Yes, that makes sense. -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 9:05 PM To: Viswanatha Rao Cc: 'Wesley Furgiuele'; [EMAIL PROTECTED] Subject: Re: select rows by compare on datetime column - more on time decrement You

Re: select rows by compare on datetime column - more on time decrement

2004-08-18 Thread Michael Stassen
Wesley Furgiuele [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 3:11 PM To: Viswanatha Rao Cc: [EMAIL PROTECTED] Subject: Re: select rows by compare on datetime column - more on time decrement What version of MySQL are you using? You have different options. http://dev.mysql.

RE: select rows by compare on datetime column - more on time decrement

2004-08-18 Thread Viswanatha Rao
D] > Sent: Wednesday, August 18, 2004 11:36 AM > To: Viswanatha Rao > Cc: [EMAIL PROTECTED] List > Subject: Re: select rows by compare on datetime column > > Vishwa: > > Sorry -- I used a specific time value as an example, but since you were > asking about current

Re: select rows by compare on datetime column - more on time decrement

2004-08-18 Thread Wesley Furgiuele
d these values to plot a chart. Please let me know? -Original Message- From: Wesley Furgiuele [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 11:36 AM To: Viswanatha Rao Cc: [EMAIL PROTECTED] List Subject: Re: select rows by compare on datetime column Vishwa: Sorry -- I used a spe

RE: select rows by compare on datetime column - more on time decrement

2004-08-18 Thread Viswanatha Rao
Message- From: Wesley Furgiuele [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 11:36 AM To: Viswanatha Rao Cc: [EMAIL PROTECTED] List Subject: Re: select rows by compare on datetime column Vishwa: Sorry -- I used a specific time value as an example, but since you were asking

RE: select rows by compare on datetime column

2004-08-18 Thread Viswanatha Rao
I got it working, please disregard the perl related question. -Original Message- From: Viswanatha Rao [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:15 PM To: [EMAIL PROTECTED] Cc: 'Wesley Furgiuele'; [EMAIL PROTECTED] Subject: RE: select rows by compare on datet

RE: select rows by compare on datetime column

2004-08-18 Thread Viswanatha Rao
iginal Message- From: Wesley Furgiuele [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 11:36 AM To: Viswanatha Rao Cc: [EMAIL PROTECTED] List Subject: Re: select rows by compare on datetime column Vishwa: Sorry -- I used a specific time value as an example, but since you were asking a

Re: select rows by compare on datetime column

2004-08-18 Thread SGreen
Please read: http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html for more details. I haven't tested it but this formula comes to mind : SELECT field_list_goes_here FROM table_name_goes_here WHERE CURTIME()>= TIME(start_time) AND CURTIME() <= TIME(end_time) Yours, Shawn Gree

Re: select rows by compare on datetime column

2004-08-18 Thread Wesley Furgiuele
Vishwa: Sorry -- I used a specific time value as an example, but since you were asking about current time, you would use CURTIME(): SELECT columns FROM table WHERE DATE_FORMAT( start_time, '%H:%i:%s' ) >= CURTIME() AND DATE_FORMAT( end_time, '%H:%i:%s' ) <= CURTIME(); Wes On Aug 18, 2004, at 12

Re: select rows by compare on datetime column

2004-08-18 Thread Wesley Furgiuele
Does the date matter, or only the time? If date matters (you want to find all records between 2004-06-01 10:00:00 AND 2004-06-03 18:00:00): SELECT columns FROM table WHERE start_time >= '2004-06-01 10:00:00' AND end_time <= '2004-06-03 18:00:00' If only time matters( you want to find all records