20
Views
1
Comments
Solved
Date Picker Shows Today, But Saves Yesterday’s Date in Database
Question
Application Type
Reactive

Hello,

I'm using the Iteration Date Picker widget from OutSystems UI to let users select a date. I store the selected date in a local variable using the OnSelect event of the date picker. Everything seems fine visually — for example, I select today's date (say, May 17).

However, when I save this data to the database and check the stored value, it ends up saving yesterday’s date (May 16).

I'm not manipulating the date in any way before saving. Just passing the local variable to an aggregate create action.

Any idea why this discrepancy is happening?

UserImage.jpg
Aravind I
Solution

Hi @Senthil Nathan A 

Try to use the Date data type instead of DateTime, if Date only need.

  • This avoids automatic time zone conversion.

  • Just ensure that:

    • The local variable bound to the Date Picker is of type Date.

Thanks,

Aravind


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.