Found who to thank:  Richard Lewis & Stuart Boydell.
& see Richard's

                  DYMD[2'',2'',2]

to eliminate delimiters:

Sent: Wednesday, October 12, 2005
To: '[email protected]'
Subject: RE: [U2] Date Conversion Codes


>  From: Richard Lewis
>  And did you know you can get that result without multiple conversions?
>
>            DYMD[4'',2'',2]
>
>  instead of:
>
>            DYMD[4,2,2]}MCN
___________________________________________

>  From:[email protected]
>
>     0007: dwamdby[", ",,2", "]


U2 Users List
   Oct 2005
   Subject: [U2] Date Conversion Codes
From: Richard Lewis
And did you know you can get that result without multiple conversions?
Try:
     DYMD[4'',2'',2]
instead of:
     DYMD[4,2,2]}MCN
___________________________________________

From: Stuart Boydell
>
>     0007: dwamdby[", ",,2", "]


On 6/3/2011 5:23 PM, Charles Stevenson wrote:
Tangentially,

ICONV( '20110603', 'D' ) = '15860' (15860 is internal date for Jun 3, 2011.)
   ICONV(   '110603', 'D' ) = '15860'

   OCONV(    '15860', 'DYMD[4,2,2]': @VM: 'MCN' ) = '20110603'
   OCONV(    '15860', 'DYMD[2,2,2]': @VM: 'MCN' ) =   '110603'

I went many years before discovering these ways of dealing with YYMMDD &, YYYYMMDD.
I think I learned that on this list.
I'm ashamed to not recall whom I owe.

They are not reflexive so be careful if you use these as conversions in a dictionary. As I-desc or correlative might be better.

By the way, that concatenation of the 2 vm-delimited conversion codes happens at UV compile time, not run-time, because all 3 elements are constants.

Chuck


On 6/3/2011 4:04 PM, Rex Gozar wrote:
FYI -

"DY4MD-" and "D4-YMD" will output YYYY-M-DD for single digit months.
"D4-YMD[4,2,2]" will properly output YYYY-MM-DD.

rex


_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to