Rewriting date from MySQL
Posted: Tue Nov 14, 2006 12:51 pm
Hi everyone!
When I insert data into an SQL database that needs to be time stamped I like to use the "NOW()" function built into MySQL. This inserts information that looks like "2006-11-10 16:26:20" and while I enjoy using this on the database end, it isn't too readable when I'm displaying it.
When I grab the data from the database for displaying I would like to rewrite it to, for example, something like "November 10th, 2006 at 4:26"
How would I do this?
When I insert data into an SQL database that needs to be time stamped I like to use the "NOW()" function built into MySQL. This inserts information that looks like "2006-11-10 16:26:20" and while I enjoy using this on the database end, it isn't too readable when I'm displaying it.
When I grab the data from the database for displaying I would like to rewrite it to, for example, something like "November 10th, 2006 at 4:26"
How would I do this?