function strototime() which accepts English textual datetime strings and outputs timestamps can be combined with the date() function to output a formated date.
For instance,
date("n/j/y",strtotime($someDate))
will accept a datetime of pretty much any format and output it as mm/dd/yyyy.
This can come in handy when working with dates stored in a database as strings or when converting between International and US formats.
No comments:
Post a Comment