In Strapi While reading data from Postgres Db getting all dates as null in response

I have Created Collection In CMS & added Entry. Now Entered data is stored in Database for Date in timestamp without timezone but same is not reflecting in CMS List as getting date value as null in response.

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

1 Like

1 Like

I’m having the same issue with PostgreSQL version 12.9, but it works fine with version 12.11.
This issue is affecting draft&publish functionality, as Strapi will always read any date data as null (createdAt, updatedAt, and publishedAt).

I tried to use Query Engine API to query to db directly, but the date always return null

After more browsing in the Strapi github issues, I think this problem related to PostgreSQL datestyle which you can set with SQL query SET datestyle TO 'ISO, MDY'.
Based on this github issue When postgres datestyle is set to SQL, DMY all created_at and updated_at dates are returning null · Issue #6783 · strapi/strapi · GitHub, Strapi currently don’t support ISO, DMY datestyle