would be useful.

and:
the string to date work only with american format month day year
but not with the european format day month year, and convert in unix timestamp and not in date.
eg. i need to convert a string like 27/11/2012 (today) in the date european format, not in timestamp.

eg.: date("d/m/Y", strtotime(preg_replace("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/i", "$2/$1/$3", '24/10/2012')));

Comments

eliaspallanzani’s picture

Issue summary: View changes

added something

eliaspallanzani’s picture

Issue summary: View changes

added code

Anonymous’s picture

Issue summary: View changes