Jump to content

[SOLVED] How to convert d/m/y => y/m/d?


A JM

Recommended Posts

Hiya mate,

 

This works, Im sure there are easier ways but it works at the end of the day.

 

<?php

$change = "17/08/2009";

list($date, $month, $year) = explode("/", $change);

$date =  $date . '-' . $month . '-' . $year; 

echo $date;

?>

 

James.

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.