Date

Date$
Syntax: DATE$([v]) - String or number representing a date with optional modifier v

Optional modifiers are:

print date$("dd") 'return day of month padded to 2 digits with leading zeros (eg. 07) print date$("ddd") 'return abbreviated day of the week (eg. Wed) print date$("dddd") 'return full day of the week (eg. Wednesday) print date$("mm") 'return month number padded to 2 digits with leading zeros (eg. 03) print date$("mmm") 'return abbreviated month name (eg. Mar) print date$("mmmm") 'return full month name (eg. March) print date$("yy") 'return last two digits of the year (eg. 07) print date$("yyyy") 'return year and century (eg. 2007) print date$("days") 'return number of days since Jan 1, 1901

Modifiers can be combined as the following examples show:

print date$ ' Oct 31, 2007 returns string print date$("mm/dd/yyyy") ' 10/31/2007 returns string print date$("mm/dd/yy") ' 10/31/07 returns string print date$("yyyy/mm/dd") ' 2007/10/31 returns string - can be used for sorting print date$("days") ' 39019 returns number - days since Jan 1, 1901 print date$("4/1/2002") ' 36980 returns number - days since Jan 1, 1901 for given date print date$(36980) ' 04/01/2002 returns string - mm/dd/yyyy string returned

code format="vbnet" print date$ 'Oct 31, 2007 print date$("mm/dd/yyyy") '10/31/2007 print date$("mm/dd/yy") '10/31/07 print date$("yyyy/mm/dd") '2007/10/31 print date$("days") '39019 print date$("4/1/2002") '36980 DOESN'T WORK CORRECTLY IN BETA 4 print date$(36980) '04/01/2002 code