|
Booth Martin wrote: > > Lets say there is a display screen with a date field on it and the DDS for > the screen defines it as DATFMT(*JOB). This is all very nice but I'd like > to show the user a field next to it that says "mm/dd/yy" or "yyyy-mm-dd" or > whatever the format is. Is there a simple way to do that? > Here's a fairly simple way to get the right format and separator: D datechar s 8a D p s 10i 0 /free datechar = %char(d'1975-02-13' : *jobrun); if %subst(datechar : 4 : 3) = '044'; // 31 + 13 julian days %subst(datechar : 1 : 2) = 'yy'; %subst(datechar : 4 : 3) = 'ddd'; else; datechar = %xlate('750213' : 'yymmdd' : datechar); endif; dsply datechar; *inlr = '1'; /end-free
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.