Date in mmm yyyy format in postgresql

后端 未结 5 1267

I have a table with a column of type timestamp without time zone.

I want to select that column with the mmm yyyy format – for example, “Mar 2011”. How to f

5条回答
  •  无人共我
    2021-02-01 13:52

    You can write your select query as,

    select * from table_name where to_char(date_time_column, 'YYYY-MM')  = '2011-03';
    

提交回复
热议问题