Jump to content

Get day from date?


Perad

Recommended Posts

I was just wondering how I would get the day of the week from the string "12/07/07".

 

As you'll see from the answers, it depends on what the highly ambiguous 12/07/07 means.  Could be d/m/y; m/d/y; y/m/d; y/d/m etc.  The 'standard', ISO date representation of Y-m-d (e.g. 2007-08-17 for today) is always the best bet for a database-stored date since you can also use it for ordering logically or in calculations very simply - and you can use php to re-present it in your own favourite form of date display.

Link to comment
https://forums.phpfreaks.com/topic/65389-get-day-from-date/#findComment-326548
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.