How do I extract the date and time from a datetime field?
I tried left and that's not working. thanks
seth
First convert it to a Unix timestamp using strtotime(), then use date() to return it in whatever format you want.
I tried left and that's not working.
Umm, what? Tried left?
using mysql? Check out http://www.mysql.com/doc/en/Date_and_time_functions.html
date_format() should do the trick for you.
Cgraz
date() will do it too, if you convert the datetime to a timestamp with strtotime() first.