Re: timestamp formatting on display?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Aaron Wolski" <aaronjw@martekbiz.com>
> Having a brain laps and not sure where in the manual to look and sadly I
> need a QUICK solution.
>
> I have a date formatted in a table like: 20030826132457
>
> Now.. I went to MySQL timestamp from UNIX timestamps because I like the
> readability of them when just looking at the Tables. How would I format
> the date something like: August 26, 2003??
>
> I could easily do this with a UNIX timestamp.. not sure if the same is
> possible with this type of timestamp. Also.. I can't use the MYSQL
> functions to format the data into a UNIX TimeStamp. not int his query.

How about using DATE_FORMAT() in your query to format the date? It works
almost the same way as date() in PHP.

If not, run the date through strtotime() and then use date() to format it.

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux