DateInfo
- Last UpdatedJul 18, 2023
- 2 minute read
Returns the date format currently used on the Plant SCADA Server.
Syntax
DateInfo(nInfo, nExtra)
nInfo:
Determines the contents of the string returned by the DateInfo() function. Valid values and resulting strings are:
1 - The current date order:
• "0" - MMDDYY
• "1" - DDMMYY
• "2" - YYMMDD.
2 - The current date delimiter.
3 - The current short date format.
4 - The current long date format.
5 - The current extended date format.
6 - The short weekday string. The particular weekday returned is determined by the nExtra argument.
7 - The long weekday string. The particular weekday returned is determined by the nExtra argument.
8 - The short month string. The particular month returned is determined by the nExtra argument.
9 - The long month string. The particular month returned is determined by the nExtra argument.
nExtra:
When an nInfo argument of 6 or 7 is specified, the nExtra argument determines which weekday (1-7) is returned by the DateInfo() function.
When an nInfo argument of 8 or 9 is specified, the nExtra argument determines which month (1-12) is returned by the DateInfo() function.
The nExtra argument is ignored if any other nInfo value is passed to the function.
Return Value
A string containing one of the following:
-
Current date order ("0" for MMDDYY, "1" for DDMMYY, "2" for YYMMDD;
-
Current date delimiter;
-
Current short date format;
-
Current long date format;
-
Current extended date format;
-
Short weekday string;
-
Long weekday string;
-
Short month string;
-
Long month string;
This depends on the nInfo and nExtra arguments passed to the function.
Related Functions
Example
! If the current system date is the fourth of December 2002;
TwelfthMonth=DateInfo(9,12);
! Sets TwelfthMonth to "December".