pjs.getCurrentJobDateNumeric()
This API was added in version 7.24.
Description
The pjs.getCurrentJobDateNumeric() API returns the current job or session date as a numeric value, in either 6-digit or 8-digit format depending on the length specified.
Parameters
Length (optional) - The desired length of the numeric return value.
6returns 6-digit format (MMDDYY,DDMMYY, orYYMMDD, depending on the job date format).8returns 8-digit format (MMDDYYYY,DDMMYYYY, orYYYYMMDD, depending on the job date format). The default is8.
Return Value
The current job or session date, as a number in either 6-digit or 8-digit format.
Behavior
Uses the job or session date returned by
pjs.getCurrentJobDate().Honors the job’s date format (
*MDY,*DMY, or*YMD), or the override incontrolOptions.dateEdit.Defaults to
*MDYif no format is specified.Formats the date according to the specified length and returns it as a number.
Examples
Example 1: Default 8-Digit Format
pjs.getCurrentJobDateNumeric();
// Returns: 7162025 (for July 16, 2025 in *MDY format)Example 2: Explicit 6-Digit Format
pjs.getCurrentJobDateNumeric(6);
// Returns: 71625 (for July 16, 2025 in *MDY format)RPG Equivalent
*DATE