Jump to content

[SOLVED] Date formatting


melissal

Recommended Posts

You can, as long as you modify your date from from dd/mm/yyyy to the American mm/dd/yyyy

 

<?php
$date = '12/31/2007';
$day_of_week = date('l', strtotime($date));
echo $day_of_week;//Monday
?>

 

The strtotime() function wont work with the UK formatted dates.

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.