dloj
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.
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(%
FROM example
and
So I think I am doing everything wrong. Any help would be appreciated.
syntax is date_format(column_name, 'formatting options')
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, I had used TIME_FORMAT but thanks for making that clear to me.