The setDtFmt() sets the default format for dates: this format is used in the top right corner of the Apps Desktop, and also as the format for the output of getDtStr() (when it's used without a parameter to override this setting).
The eight possible formats each have a number associated to them, which is the number you should pass to setDtFmt(). It will return the number of the previous setting, which is convenient if you want to restore it later.
The eight formats are as follows (dd, mm, and yy are the date, month, and year respectively, in two digits)
|Format Number||Date Format|
Typically, you'd only use this command in a program if you needed to use getDtStr() many times with the same format. In that case, save the return value of setDtFmt(), and use it to restore the date format at the end of the program.
40 - Argument error happens when the format number is not an integer in the range 1-8.