Hi-- I have a UK date in the format "06/Apr/2010 13:24" that I need to insert into a mysql db date field.
The PHP strtotime function can't handle this string-- has anyone got any ideas other than writing a custom function?
Thanks!
Hi-- I have a UK date in the format "06/Apr/2010 13:24" that I need to insert into a mysql db date field.
The PHP strtotime function can't handle this string-- has anyone got any ideas other than writing a custom function?
Thanks!
It looks like you could substring on the space then explode on the "/"'s and then be able to get each piece to work with. Seems odd that there isn't already a way to do this...
Try replacing / with -
strtotime(str_replace('/', '-', '06/Apr/2010 13:24'));