Jump to content

[SOLVED] Date format question?


Solarpitch

Recommended Posts

Mysql requires american date format YYYY-MM-DD. Akward aren't they like spelling colour without a u! :D

<?php
// 1st nov 2009
$date = "01/11/2009";
$date = implode("-",array_reverse(explode("/",$date)));
print $date;
?>

 

or use strtotime() function with date()

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.