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
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.
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
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
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
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
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
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
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
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
10 matches
Mail list logo