||No Files Available
||Wil van Antwerpen
||There are some serious problems when using date masks in vdf.
Using a normal date mask on your date-fields will cause some very strange behaviour of your programs.
Most users of dataflex programs will do a lot of data-entry, this means that they will type pretty much, they know what they typed and as a result they will not always watch at the screen for the results.
This implies that if the program has some automatic conversion to correct dates it should not make any mistakes.
The table below will show what happens if the user enters ambiguous dates. The results of various date settings in the windows regional settings are shown.
OpenWiki Format Parsing Error, no content passed.
- With the two digit years in the regional settings a year-value of 0999 is displayed as
"99" as long as the field doesnt have the focus. This means that it will
look to the user that he entered "1999" while in fact there is an error in his
date of a 1000 years.
- Users that are not stretching the date masks to its limits will not experience these
problems "7-7-99" and "070799", or "7-7-1999" all are
correct dates and will be correctly interpreted.
At the moment there is only one good way to protect your program against this danger:
Do not use date-masking at all. Without the extra masking DataFlex will correctly return an error to the user if he or she makes a mistake.
DataFlex itself is smart enough to handle the dates properly, it will even show the users a normal date mask.
Date Published: 03/11/2001