Find by createdAt does not work

System Information
  • Strapi Version: 4.12.5
  • Operating System: Mac 14
  • Database: Postgres15
  • Node Version: 18
  • NPM Version: 9.6
  • Yarn Version: 1.22

When I tried to query a user from database:

const user1 = await strapi.db.query('plugin::users-permissions.user').findMany({
      where: { id: 1}
})

user1 should be something like this:

user1 = {
    "id":1,
    "username":"cxzcxz",
    "provider": "local",
    "createdAt": "2024-06-18T01:54:32.042Z"
}

and then I tried to find user by createdAt

const user2 = await strapi.db.query('plugin::users-permissions.user').findMany({
      where: { createdAt: user1.createdAt}
})

the user2 will be empty, please tell me why?