Return to the RPG Tips
/Free - sample RPG Date Conversion Code snippits in /Free
// Deriving a J.D. Edwards Date from a Date: C5DQE = %int(%char(%Date(ToDay:*ISO):*longjul0)) - 1900000; // Convert a J.D. Edwards Julian Date into an 8,0 CCYYMMDD field. GlDate = %Uns(%Char(%Date(%Subst(%Editc(Gldgj:'X'):2:5) :*Jul0):*Iso0)); // Convert a 6,A MMDDYY parm into an 8,0 CCYYMMDD field. Parm_Date8 = %uns(%char(%Date(Parm_Date:*Mdy0):*Iso0)); // Todays Date in Ccyymmdd format (TODAY is defined as an 8,0 field) TODAY = %uns(%char(%Date():*Iso0)); // Convert Date from ccyymmdd to mmddyy Sdt = %uns(%char(%Date(#SoSdt:*Iso):*Mdy0));
[report a broken link by clicking here]