How to fix Invalid argument for SQL/JSON datetime function in PostgreSQL | DevErrors