to_char(now(), 'Dy (Day), Mon (Month)') : Date Time Format « Date Timezone « PostgreSQL






to_char(now(), 'Dy (Day), Mon (Month)')


postgres=# SELECT to_char(now(), 'Dy (Day), Mon (Month)') AS abbreviations,
postgres-#        to_char('yesterday'::timestamp, 'FMMonth FMDDth') AS yesterday,
postgres-#        to_char('yesterday'::timestamp, 'FMDDth FMMonth') AS "yesterday UK";
          abbreviations           |  yesterday  | yesterday UK
----------------------------------+-------------+--------------
 Sun (Sunday   ), Oct (October  ) | October 7th | 7th October
(1 row)

postgres=#
postgres=#
           
       








Related examples in the same category

1.to_char(now(), 'HH:MI PM')
2.to_char('yesterday'::timestamp, 'FMMonth FMDDth')
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')