In PostgreSQL, the abbreviation for "day of month" is not "dom". Instead, it is "day". You can truncate the day of the month from a date column in PostgreSQL using the following syntax:How to truncate day of month in PostgreSQL?
Like, I am trying to truncate
DATE_TRUNC('dom' , column_name) but it gives error.
scss:
DATE_TRUNC('day', column_name)
sql:
SELECT DATE_TRUNC('day', my_date_column) FROM my_table;
In PostgreSQL, the abbreviation for "day of month" is not "dom". Instead, it is "day". You can truncate the day of the month from a date column in PostgreSQL using the following syntax:How to truncate day of month in PostgreSQL?
Like, I am trying to truncate
DATE_TRUNC('dom' , column_name) but it gives error.
scss:
DATE_TRUNC('day', column_name)
sql:
SELECT DATE_TRUNC('day', my_date_column) FROM my_table;