DtvLong dal_bsf_chk_dat (str)
Checks the passed string for conformity using the mask date format either specified in the default value DATEFORMAT or via the function dal_bsf_set_dat.
DataView calls tis function by default when leaving a field of the date type.
For checking and correcting the date string the following rules apply:
- The numeral well use entered are assigned to the parameters from left the right.
- The numeral values for day, month, hour, minute and second must have one or two digits. If it has one digit, a leading zero is added.
- The numeral value for the year must have two or four digits. If it has only one digit, the value is replaced by the year of the current date. If it has two digits and lies between 00 - 49, it is completed as 20xx, while a range of 50 - 99 will result in 19xx.
- If no character is input, NULL will be accepted a state value.
- If too few characters are input, the function will complete the missing parameters from the corresponding values of the current date.
- Each separator entered is replaced by the seperator defined in the mask date format, if required.
- If numeral values are outside the range of values of the corresponding parameter or if the input string starts with a separator, an error message will be output.
- Any subsequent separators will be removed.
For leading zeros make the string longer, you must not forget to dimension the string with the theoretic maximum length of 21 characters.