How to change date values

0
Hi all I am facing one issue in test environment in local its working fine but issue is with test environment. I made custom search functionality when I am searching records based on dates for example : if I add a date like 2/1/2023 but in parameter its taking  1/1/2023. Because of this mismatched date data will not show on page. Also I tried with to add extra day to parameters date values but still its giving me error. Please give me a solution how to resolve this issue.
asked
3 answers
4

Hi Priyanka, 

In the microflow, you can use parseDateUTC() and you will be able to get the correct date.

 

Let me know, if you face any issues,

Hope it helps!!

answered
1

Hi Priyanka,

 

Have you turned on localization for the date attribute? A date's time will always be stored at 00:00 from the save location. If somehow the timezone is different it is possible that is displays as a different date. I would check your timezone settings of the app or maybe dont localize the attribute if it is not needed. 

answered
1

Hi Priyanka,
 

To start off, make sure you select the correct value for the "Default Timezone" based on your client's timezone. Additionally, I suggest consulting the Date and Time Handling provided by Mendix to determine whether using a localized dateTime attribute is necessary.
 

In simpler terms, if you don't need to consider specific timings, you can opt for a non-localized attribute "Use non-localized attributes if you are not interested in the time component (for example, birthdays) or if you want a date to look exactly the same all over the world."

 

answered