user1841532
user1841532

Reputation: 1

Timestamp Oracle

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

Answers (1)

ntalbs
ntalbs

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

Related Questions