| | |
Time Stamp
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jan 2008
Posts: 74
Reputation:
Solved Threads: 5
How do I make the timestamp string be displayed as something that is actually readable / understandable? Yes, I have looked on google, here and a couple other places, but I am not seeing anything too specific or I am just not understand. Thank you for your understanding, helping me out and not being too critical.
Here is what I have:
In the database:
timestamp int(11) unsigned
and it inserts it like this:
1252386167
Using Php to display Last Active it displays it like this:
1252410826
Thank you,
Here is what I have:
In the database:
timestamp int(11) unsigned
and it inserts it like this:
1252386167
Using Php to display Last Active it displays it like this:
1252410826
Thank you,
•
•
Join Date: Apr 2008
Posts: 53
Reputation:
Solved Threads: 10
Here is a customised function I use:
you would then call
You could call
PHP Syntax (Toggle Plain Text)
function EpochDate($timestamp, $format = "Y-m-d H:i:s") { $final_timestamp = date($format, mktime(0 , 0, $timestamp, 1, 1, 1970)); return($final_timestamp); }
you would then call
EpochDate("1252386167") You could call
EpochDate("1252386167", "d m Y H:i") or whatever suits for a different date format ![]() |
Similar Threads
- time stamp (Java)
- How to convert UNIX time stamp to syatem time stamp (C++)
- time-stamp (PHP)
- Convert time stamp to date using php (PHP)
- Need real time in XP (Visual Basic 4 / 5 / 6)
- Recording time stamp (PHP)
- Code Snippet: Get and set a file's date and time stamp (Pascal and Delphi)
Other Threads in the PHP Forum
- Previous Thread: Customizable Object
- Next Thread: Problem with PDFLib
| Thread Tools | Search this Thread |
advanced apache api array beginner binary broken cakephp check checkbox class cms code cookies cron curl database date datepart display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google head href htaccess html if...loop image include includingmysecondfileinthechain insert ip javascript job joomla jquery key library limit link login mail menu mlm multiple mysql oop password paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search server sessions smarty sms sorting source space sql startup stored syntax system table traffic tutorial unicode update upload url validator variable video web youtube zend





