I have the date taken form a mySQL db set in format: DD/MM/YYYY - (i.e. 17/02/2004), how can I display the day for that particular date (i.e Tuesday).
Thanks.
Convert date dd/mm/yyyy to ddd ?
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- johnperkins21
- Forum Contributor
- Posts: 140
- Joined: Mon Oct 27, 2003 4:57 pm
You can try this:
But why do you not get the date from your SELECT query ?
Code: Select all
<?php
$date = "17/02/2004";
$parts= explode("/",$date);
echo date("l",mktime(0, 0, 0, $parts[1], $parts[0], $parts[2]));
?>