How to tell if a datetime string has a date component in PHP -


i need again, here want do:

  • create datetime object date (only) following given format (so far it's okay)
  • alter datetime string following specified format well, can either single time of date , time string.

an example:

we have single date in filename base date of datetime object. inside file date , time strings, of time time. if string holds date, have update base date accordingly.

a bit difficult explain, hope understand. feel solution quite obvious still, can't find it...

cheers!

just use strtotime('yourtimestring') http://uk3.php.net/strtotime

it parse string if able , return false if not.


Comments

Popular posts from this blog

rest - Spring boot: Request method 'PUT' not supported -

php - Magento - Deleted Base url key -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -