Jump to content


Photo

Reversing Numbers Into a Date


  • Please log in to reply
1 reply to this topic

#1 yarub

yarub
  • Members
  • PipPipPip
  • Advanced Member
  • 72 posts
  • LocationSioux City, IA

Posted 07 August 2006 - 09:25 PM

Using the time() function, you can input a ten-digit number into a database or something. However, if you pull that date back out, how could you put it back into time format? I want to make "4738583953" appear as "Aug 07, 2006 04:25:00pm" or whatever it would be.

Can anyone help me?

#2 Woodburn2006

Woodburn2006
  • Members
  • PipPipPip
  • Advanced Member
  • 214 posts

Posted 07 August 2006 - 09:32 PM

try this:

<?php

$currdate = time();
$convert = date("d/m/Y",$currdate);

echo "Date = $convert<br>";
echo "Timestamp = $currdate<br>";

?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users