Datepicker select wrong date

Hi everyone,

My problem:

When date select from datepicker it have wrong value, for example


How I can fix it? 


BR, Kirill.

Hi Kirill,


well spotted.  I made a test oml and see same in my debug window.  But this shouldn't be a problem to pick a date.  I see you are trying to use the DateTimeToDate function, to get the date out of the StartDate parameter, but there's no need for that, you can just assign the value to a date variable, and that will hold the date you actually picked.


See attached oml


Dorine

Dorine Boudry, I need change selected date (change date to Dt #05\:00\:00#) for next compares= (

Yes,

in the formula, don't do the DateTimeToDate function, just use the StartDateTime value.


BuildDateTime(StartDateTime,#05:00:00#)


See attached oml, added a build function to show

Dorine

Solution

Hi,

The problem is you use DateTime datatype instead of Date.

If you use Date data type for your variables that attach to the datepicker you get the correct date.

Regards,

Daniel

Solution

Daniël Kuhlmann wrote:

Hi,

The problem is you use DateTime datatype instead of Date.

If you use Date data type for your variables that attach to the datepicker you get the correct date.

Regards,

Daniel

Thanks. This works. But it strange why OnSelect event DatePicker use DateTime


But

SyntaxEditor Code Snippet

BuildDateTime(StartDate,#05:00:00#)

with StartDate- Date datatype 

Made DATE #02\:00\:00# instead of DATE #05\:00\:00#