Hi,
i check the DMY2DATE function in Outlook Synch. Type Conversion and it gives me the wrong date
sample date is 02/12/10
Day := 12
Month := 02
Year := 10
when i used
DateVar := DMY2DATE(Day,Month,Year);
it return
2/12/0010
i assuming its 2/12/10
Thinking, programming, coding, developing == Music!
0
Comments
I always use parameter "year" in function DMY2DATE as 4 number year , so:
Just use instead
Form C-Side help about Year Parameter:
Year
Data type: integer
The four-digit number of the year. If you omit this optional parameter, the system uses the current year as the default.
Anyways, did you can change the regional and language setting for your PC? change the date formats to dd/MM/yyyy and try it again?
I like to use function in way that i know it works fine. If 2 digit can produce some problem in some situations i prefer to not used it... not a big deal using 4 digit. When you use 2 digit? When you hardcode something - so it is wrong in other way
Exactly. If you know 2 digits doesn't work, use 4 digits. It's not a big deal.
It's good to know that it is an issue though, something to look for if the issue ever comes up :thumbsup:
RIS Plus, LLC
My Blog - nav.education
Has it ever been possible to use a 2 digit date? I just can't see how you can expect this if the parameter is an integer. If it was text, then there might be an assumption that it uses the same parser as the UI, but not integer. In fact if it allowed 2 digits, that would automatically exclude all years form 0 to 999 since integers automatically strip the leading zeros (obviously) so it the integers 0099 and 99 are identical.
Sorry to be pedantic, but I just don;t see this as an error, not even a so called "undocumented feature". I see this as exactly how the function should work.
thanks for your reply, and sorry for my late response.
:thumbsup: