Jump to content

date format question


tribal

Recommended Posts

From MySQL manual:

 

MySQL retrieves and displays DATETIME values in \'YYYY-MM-DD HH:MM:SS\' format.

 

I had the same issue and wanted to store the date in mysql in a custom format. I defined the column to be a TEXT instead of DATETIME and populated it with PHP

[php:1:44d99b4a40]<?php

$datetime = date(\"d/m/Y h:i\");

?>[/php:1:44d99b4a40]

 

Hope it helps.

Link to comment
https://forums.phpfreaks.com/topic/1217-date-format-question/#findComment-4078
Share on other sites

  • 4 years later...

I was searching the same problem. I would like to change it on output but i can't find any functions that will do that. They only format the time as it is now. I want to take any date from the DATE on mysql and change it to eg. Jan. 11, 2005 .. can anyone help me find a function that will do this, thanks!

Link to comment
https://forums.phpfreaks.com/topic/1217-date-format-question/#findComment-531819
Share on other sites

Archived

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

×
×
  • Create New...

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.