WithFlyingColors
WithFlyingColors

Reputation: 2770

date is not presented correctly

I insert my date with the Now() mysql function, and when I select the date I use this:

DATE_FORMAT(com.date,'%h:%i  %d/%m/%Y ')

Basically, the output that I get is the same, no matter what time I enter the input (The date is correct, but the time is incorrect):

12:00 20/11/2011

How can I correct this?!?

Upvotes: 0

Views: 37

Answers (1)

Pradeep Sanjaya
Pradeep Sanjaya

Reputation: 1846

Mysql set current timestamp when you use now() function. So it should be correct output when you query by SELECT DATE_FORMAT(com.date,'%h:%i %d/%m/%Y ')

I assume your com.date column is a timestamp, not a date.

Upvotes: 2

Related Questions