Date Format in Mysql

MantisBT forum for users who prefer to ask and answer questions in French.

Moderators: Developer, Contributor

Post Reply
Mmarouane89
Posts: 49
Joined: 24 Mar 2015, 22:41

Date Format in Mysql

Post by Mmarouane89 »

Hello,
when i add a date in custom field date the format changes, for example when i add: 2015-03-23 i find in database in mantis custom field string this value: 2343434 how i can get the format correctly ? mantis uses a specil function to save the date field in table ?
Mmarouane89
Posts: 49
Joined: 24 Mar 2015, 22:41

Re: Date Format in Mysql

Post by Mmarouane89 »

i have founded it, Mantis uses this function date('Y-m-d H:i:s' 6323944) to show datetime in the pages
fabi
Posts: 3
Joined: 12 May 2009, 13:26

Re: Date Format in Mysql

Post by fabi »

Hi Mmarouane89!

Can you describe for me what it looks like is MySQL script?

so

Code: Select all

select function date ('Y-m-d'date_submitted )from mantis_bug_table
It does not work

Thank you
Mmarouane89
Posts: 49
Joined: 24 Mar 2015, 22:41

Re: Date Format in Mysql

Post by Mmarouane89 »

In MySQL i get the value and i use a php function; for example: Select date from ...
$date = date('d-m-Y', $row[0]);
Post Reply