[SOLVED] date representation
Posted: Mon Jul 19, 2004 9:08 am
how can i represent the year "98","99","04" in the format "1998","1999","2004".
I store the two representation in a variable but want to convert it to a four digit representation. i tried the following but it wont work:
the data i pull is from a database field which stores the year in two digit format in a varchar field:
I store the two representation in a variable but want to convert it to a four digit representation. i tried the following but it wont work:
the data i pull is from a database field which stores the year in two digit format in a varchar field:
Code: Select all
<?php
$yyyy = "99";
$mytt = date("Y",strtotime($yyyy."/02/02"));
echo $mytt . "<br>";
?>