Date gets the value of one day before the selected date. Why?

0
Hi Experts, I have a form where I creates employees and add their birthdate and date of joining but when I try to debug by retrivig it from database I can see the date is added as one day before the actual selected date.   I have attached teh screenshot too.Example: I had selecte dthe birthdate of employee as 5 march 2021 then the birthdate comes as 4 march 2021. can anyone please let me know the reason and how can I resolve this pleasE?  
asked
2 answers
1

This is as designed. If you enter a date with localized yes, the UTC Datetime is stored. In Europe often 1-3 hours before the localized datetime.

The date entry is without time. If you use a date editor with format date+time you could set it to 4 march 2021 12:30. In the database it will be something like 4 march 8:30.

if you need the real datetime in the database, set localized no or do some manipulation like

 

addHours(trimToDays($Date), 12)

 

answered
0

Hi Harsh Bhanushali,

                check the utc for data and time or set the date type localize no

answered