Formatting dates in PostgreSQL

前端 未结 2 1208
难免孤独
难免孤独 2021-01-15 02:16

I have a field which its format is date with time as: YYYY-MM-DD HH-MM-SS for example: 2000-08-12 00:00:00 I want to get just the date part and cha

2条回答
  •  余生分开走
    2021-01-15 02:51

    You can use the to_char function to format your column:

    SELECT TO_CHAR(ddatte, 'dd/Mon/yyyy') FROM mytable
    

提交回复
热议问题