pjs.date()

pjs.date()

 

The pjs.date() API converts an expression to a date, or returns the current date if no parameters are passed to it. 

Parameters
  • Field or expression (optional)

  • Date format (optional)

Example
pjs.define("out1", { type: 'date' }); pjs.define("out2", { type: 'date' }); pjs.define("in1", { type: 'char', length: 10, initValue: '06/13/2016' }); pjs.define("in2", { type: 'decimal', length: 6, decimals: 0, initValue: 160613 });   out1 = pjs.date(in1, "*usa"); out2 = pjs.date(in2, "*ymd");

 

RPG Equivalent

%DATE()