| | |
MySQL Timestamp into PHP Format
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I have a timestamp column in a mysql table.
Using PHP, how do I convert the timestamp format which is "YYYY-MM-DD HH:MM
S" into a format like "March 16 2008, 08:41 am" ?
Please help
Thanx
Using PHP, how do I convert the timestamp format which is "YYYY-MM-DD HH:MM
S" into a format like "March 16 2008, 08:41 am" ?Please help
Thanx
•
•
Join Date: Aug 2005
Posts: 150
Reputation:
Solved Threads: 13
basically there are two ways of solving it. The first is the explode the data into chunks and then converting them.
secondy, in my opinion the better and easier way:
use the function date("prefered format",mktime(...))
first arguments is you format that you like.
the secend argument created an unix-timestamp (look at http://de2.php.net/manual/en/function.mktime.php). it allows you to generate any date and time you like.
secondy, in my opinion the better and easier way:
use the function date("prefered format",mktime(...))
first arguments is you format that you like.
the secend argument created an unix-timestamp (look at http://de2.php.net/manual/en/function.mktime.php). it allows you to generate any date and time you like.
![]() |
Similar Threads
- csv, convert date, mysql, php (PHP)
- php mysql question (PHP)
- MySQL date formatting (PHP)
- Login Security ! (PHP)
Other Threads in the PHP Forum
- Previous Thread: Generate static html page
- Next Thread: forum login
| Thread Tools | Search this Thread |
ajax apache api array basics beginner binary bounce broken cakephp checkbox class cms code codingproblem combobox cron curl database date display dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla js limit link login loop mail menu mlm mobile multiple mysql nodes oop outofmemmory paging parse paypal pdf php problem procedure query radio ram random recursion regex remote return script search server sessions smash sms soap source space sql syntax system table tutorial up-to-date update upload url validation validator variable video web webapplications websitecontactform xml youtube





