to_char(now(), 'HH:MI PM') : Date Time Format « Date Timezone « PostgreSQL






to_char(now(), 'HH:MI PM')


postgres=# SELECT to_char(now(), 'HH:MI PM') AS the_time;
 the_time
----------
 03:20 PM
(1 row)

postgres=#
           
       








Related examples in the same category

1.to_char('yesterday'::timestamp, 'FMMonth FMDDth')
2.to_char(now(), 'Dy (Day), Mon (Month)')
3.to_char(start_date, 'FMMonth FMDDth, YYYY')
4.to_char(start_date, 'YYYY-MM-DD')
5.to_char(start_date, 'Y,YYY "years" A.D.')
6.to_date('198025thJune', 'YYYYDDthMonth')