I have an input field for Date/Time, but I’m facing challenges in getting the correct time value in my database.
It seems like the database is reading the exact time I submit the form based on the date field and not the specific time I actually choose in the Time Picker. Has anyone experienced the same issue, and does anyone have any tips?
When a user pick e.g todays date and the time 17:00 I don´t get the time 17:00 in my database but the current date/time the user submit the form.
This is how it looks like in my database when I extract the time. It’s showing me the current time I pushed the submit button and not the chosen time that was 13:30 in this case.
I´m using the time picker and chose e.g date: 08.11.2023 and time: 13:30
The record I get in my database is always date: Jan,1, 1970 and the time is the time I submit the form and not the date or the time chosen in the dropdown.
I tried on another page and database now. And get another scenario. I will try to explain:
I have a datefield in my database (SQL): When insert the date from the date field it shows me the chosen date but not the chosen time. It shows my the actual time I hit the “save” button.