your probably looking for curtime() <manual snip> CURTIME() CURRENT_TIME Returns the current time as a value in 'HH:MM:SS' or HHMMSS format, depending on whether the function is used in a string or numeric context: mysql> select CURTIME(); -> '23:50:26' mysql> select CURTIME() + 0; -> 235026 </manual snip>
On Thursday 14 November 2002 8:36, you wrote: > Can anyone help with (what I hope is) a pretty simple time function > query? I need to extract a set of records from a table based on > separate date and time columns, where both the date and time are older > or equal to now. > > For example, my sql query is going to look a bit like this: > > select ID, Live_Time, Live_Date from schedule > where TO_DAYS(NOW()) <= Live_Date > and SOMETHING <= Live_Time > > and it's the "SOMETHING" that I need to know! > > (Before you ask, there are reasons why the date and time are separate > columns rather than being a single datetime column, and I don't want > to rewrite the structure unless I have to) > > Thanks > > Mark > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> Trouble > unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- mysql, sql, query --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php