Re: Cannot format date in R4GL
Posted in 1994
sinues@prcd.prc.mrms.navy.mil (John Sinues) writes: >Simple question....why isn't the date not formatted in my report? I'll be you have p_date DEFINEd as a DATE. If you DEFINE it as a CHAR(8), the code as written will work, but the USING assignment only applies to CHAR datatype assignments (LET), or in the PRINT command. The reason it works when you remove the USING is that p_date is then formatted to the default DBDATE environment setting (see the Reference Manual). I think it would be more common to have: LET p_date = TODAY ... PRINT ASCII 27, "&a003C", "Date: ", p_date USING "mm/dd/yy", " @ " , p_time > FORMAT > PAGE HEADER > LET p_date = DATE USING "mm/dd/yy" > LET p_time = TIME > PRINT ASCII 27, "&a003C", > "Date: ", p_date, > " @ " , p_time > # Line 1 > PRINT ASCII 27, "&a006R", > ASCII 27, "&a007C", uic, > ASCII 27, "&a021C", work_center, > ASCII 27, "&a034C", job_seq_nbr ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.