Link to home
Start Free TrialLog in
Avatar of dloj
dlojFlag for United States of America

asked on

How to use the Time type and retrieve

I am confused as to how to use the Time type in inserting data in my table.  Currently I have Time as the type and 17:00:00 (hours:min:sec) as the way I am entering but am unable to retrieve it as 5:00 PM.

 I have tried DATE_FORMAT(%H, i%) but it does not seem to work.

 The actual syntax was:
Select example.Name, example.DAY, DATE_FORMAT(example.TIME(%H,%I))
FROM example

and

So I think I am doing everything wrong.  Any help would be appreciated.
Avatar of johanntagle
johanntagle
Flag of Philippines image

syntax is date_format(column_name, 'formatting options')
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dloj

ASKER

Yes, I had used TIME_FORMAT but thanks for making that clear to me.