1
Good morning. In my mysql database the dates are saved as dd/mm/yyyy, but the "date" html input only returns dates in the yyyy-mm-dd format, so I can’t filter the database dates, which was my goal. I was using a very simple code, like this one below:
<input type="date" name="parametro">
<input type="submit" value="Filtrar Data">
How to return the date in the same database format? In the case of plugins use, how to use them?
I suggest you take a look at Moment js. that does just that: https://momentjs.com/
– Ricardo Pontual
You will compare the dates in the query, right? If possible, I advise you to store the dates in Y-m-d format to facilitate this comparison
– Diego Vieira
Are you working with a database that already has formatted dates or are you entering these dates by the front-end entry? I ask this for your values already stored or that will be stored
– Lauro Moraes
The database already has dates formatted in dd/mm/yyyy. Use html to filter database data corresponding to the date inserted.
– Renata