Jump to content

Archived

This topic is now archived and is closed to further replies.

yarub

Reversing Numbers Into a Date

Recommended Posts

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?

Share this post


Link to post
Share on other sites
try this:

[code]<?php

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

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

?>[/code]

Share this post


Link to post
Share on other sites

×

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.