The vgVar.currentFormattedGregorianDate system variable contains the current system date in the default long Gregorian format. EGL maintains this variable for compatibility with earlier versions. New code can use strLib.formatDate().
The value is automatically updated each time the system variable is referenced by your program.
For COBOL programs, the system administrator for EGL runtime services sets the default format at installation.
vgj.datemask.gregorian.long.NLS
For more information about vgj.nls.code, refer to the EGL Generation Guide.
The format specified in vgj.datemask.gregorian.long.NLS includes dd (for numeric day of the month), MM (for numeric month), and yyyy (for numeric year), with non-numeric characters other than d, M, or y used as separators. The dateMask build descriptor property enables you to specify a different format for each NLS code. The NLS code must be one of those listed for the targetNLS build descriptor option.
You cannot use vgVar.currentFormattedGregorianDate as the target of an assignment or move statement.
Make sure that this Gregorian long date format is the same as the date format specified for the SQL database manager. By matching the two formats you can use vgVar.currentFormattedGregorianDate to produce dates in the format expected by the database manager.
The following example shows the vgVar.currentFormattedGregorianDate variable:
myDate = vgVar.currentFormattedGregorianDate;