Jump to content

Get Day from a Date


gple

Recommended Posts

That won't work, since the date() function is expecting to see a UNIX time stamp (integer) for the second parameter. Use:

<?php
$var = "2004-01-01";
echo date("l", strtotime($var)); // lowercase L, a full textual representation of the day of the week
?>

instead.

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/105281-get-day-from-a-date/#findComment-539236
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.