If the environment variable $DATEFMT is set, todaysdate will use it as a template for the output date format. $DATEFMT should indicate the order of the date elements; the number of bytes in each element, and the character used to separate the date elements, if any. The letter 'y' indicates a year byte; the letter 'm' indicates a month byte; and the letter 'd' indicates a day-of-month byte. For example, if $DATEFMT is m/d/yy, then today's date will be converted to unpadded U.S. format (11/9/98): if it's mm/dd/yy, then single-digit month and day elements will be padded with a zero (11/09/98). Note that the year element of the date will never be output as less than 2 bytes, but if more than 2 are specified in $DATEFMT, 4 will be output: mm-dd-yyy will print a 4 digit year. Finally, $DATEFMT does not necessarily need to include all 3 date elements: mm.dd is fine; so is YYYY or simply d. The format options (-e, -u, -c and -f) take precedence over $DATEFMT.
-e print output in European format (dd.mm.yyyy).
-u print output in U.S. format (mm/dd/yyyy).
-f date_format
print output in user-defined format (see $DATEFMT above).
$ todaysdate 19970911Y2K NOTE:$ todaysdate -e 11.09.1997
$ setenv DATEFMT m-d-yy; todaysdate 9-11-97