Oracle Transactional Business Intelligence

Products Banner

Syntax to converting 24 hour time format to 12 hour format in sql

1028
Views
1
Comments

Summary

Syntax to converting 24 hour time format to 12 hour format in sql

Content

Hi,

 

Anyone know the SQL syntax to convert 24 hour time format(eg. 18:00 for 6:00 PM) to 12 hour format(eg. 6:00 PM)

I tried the below query but it is not working. 

SELECT 
       TO_CHAR(TIME_NORMAL_FINISH, 'hh:MI:SS:tt') "Date 12Hr"
  FROM per_all_assignments_m

 

Thanks in advance,

Nirmal kumar

Comments