Contents - Index
Date format is an output display option for numerical values. There are ten options for date format as displayed in the following list.
Default sets the output to the short date string format that has been set in the Windows Operating system. You can change this format using the Control Panel for Region and Language. The other formats are identified by a format string involving d (for day), m (for month) and yy (for a 2-digit year) or yyyy (for a 4-digit year) . Note that lower case m indicates that the month is represented as a number between 1 and 12 whereas uppercase M indicates that the month is spelled out.
The value for a date variable may be entered into the Equations window as a string representing the date in any acceptable format using the Date function. For example, the following equation will set variable myDate to January 15, 2016.
myTime=date('15 Jan 2016')
Dates are internally stored as the number of days that have passed since December 30, 1899. This numerical representation is consistent with that used in other programs, such as EXCEL. If myTime is set to display as a numerical value, its value will be 42384. The display format can be changed to a date format in the Solutions window, Variable Information dialog or by clicking on the header cell in the Parametric, Lookup, and Arrays tables and setting the format style to Date, as shown below. Values in date format can then be directly entered into Lookup and Parametric table cells.
See also: Date function