Postgres DATE_TRUNC not behaving as expected – incorrect data showing – Postgresql
I have the following records that were created_at: 2022-11-13 14:24:02.651809 2022-11-13 15:00:43.878400 2022-11-13 16:33:18.710288 2022-11-13 18:22:59.220246 2022-11-13 18:50:59.719803 2022-11-15 20:33:19.099264 2022-11-16 15:42:51.285751 2022-11-16 15:46:28.196001 2022-11-16 16:06:31.873187 2022-11-16 16:47:32.071435 2022-11-16 19:05:38.288788 When I run: SELECT DATE_TRUNC('day', CAST(forms.created_at AS DATE) AT TIME…