View Full Version : formatting Localtime()

11-09-2007, 06:31 AM
this is the normal format of the localtime()
yyy-ddd-mm hh:nn:ss

that is the format i need
dd/mm/yyyy hh:nn:ss

i need to format into the following format and use it inside of query
select ... from... where time < newformat( localtime() )

how can i achieve the format i need?

11-09-2007, 07:00 AM
date_format() (http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format)?
But to make a comparison/ sorting, i think you may have to do it in default mysql format.