Reputation: 1
How Convert the time 16:00:00 or 08:00:00 HH12:MI AM format in oracle query
I try TO_CHAR ('16:00:00', 'HH12:MI AM')
but it shows no AM / PM .
Please check
Upvotes: 0
Views: 139
Reputation: 29458
Well, it works fine:
select to_char(to_date('16:00:00', 'hh24:mi:ss'), 'hh12:mi am') from dual;
The result is:
04:00 pm
Isn't it what you want?
Upvotes: 3