Jump to content

get weekday from DD/MM/YYYY


phppaper

Recommended Posts

Just looked at the manual and it seems that it needs the string to be in a US english format, so 10/27/2010 will be fine, as would 27 OCT 2010, but 27/10/2010 is not.

Just looked at the manual and it seems that it needs the string to be in a US english format, so 10/27/2010 will be fine, as would 27 OCT 2010, but 27/10/2010 is not. I had forgotten about that, sorry.

 

Thanks, yes you are right, only US format supported. Do you know any other way to solve the issue with non US format??

Link to comment
Share on other sites

You could convert the values to US format before using them in strtotime() if they're all stored as DD/MM/YYYY.

 

These dates aren't coming from a database query by chance, are they?

 

Well the date are stored in the MySQL as datetime format, so the method you have shown will need to do some operation. No chance for another method?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.