Error: invalid time value

Hello devs. I got this error today. Im just trying to search a field by date. Do I need convert something?

My View

My Controller




Typically I convert date to a value that is searchable in the database. The simplest experiment you could do is -

  1. Enable SQL debug in your .env file. Use the statement DB_DEBUG=knex:query. This will log all queries
  2. Try to query through the application, find for the error in the console where you are running adonis, and execute the statement through a DB client (like HeidiSQL)

Have you formatted the date field in the model? See this post.

1 Like

No i didnt.
I just remove date-fns and the error disapear
but when put a random date, returns true instead false. I have one register created ad 08/07/2020. I cant see the mistake