![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I was looking for some help with output conversion codes, to see if there was a simple way to output dates in YYYY-MM-DD format when using SORT or LIST. CALLing a subroutine will probably be too slow for this particular application. Thanks, Scott Deardorff |
#3
| |||
| |||
|
|
I was looking for some help with output conversion codes, to see if there was a simple way to output dates in YYYY-MM-DD format when using SORT or LIST. CALLing a subroutine will probably be too slow for this particular application. |
#4
| |||
| |||
|
|
0008 A;23(D/)]A;LPV(G2/1):'-':LPV(G0/1):'-':LPV(G1/1) where 23 = your date attr; ] is @VM LIST TKT.TEST ID.SUP F23 DTE 05:16:35pm 16 Jan 2007 PAGE 1 F23............ DTE......... 9141 1993-01-09 9020 1992-19-01 Chandru "Scott Deardorff" <smdamd (AT) bellsouth (DOT) net> wrote in message news:nScrh.1711$3t4.1695 (AT) bignews2 (DOT) bellsouth.net... I was looking for some help with output conversion codes, to see if there was a simple way to output dates in YYYY-MM-DD format when using SORT or LIST. CALLing a subroutine will probably be too slow for this particular application. Thanks, Scott Deardorff |
#5
| |||
| |||
|
|
Since D3/NT 7.5 and D3/Linux 7.4.2 (starting with patch A206??) the LPV doesn't work anymore as in previous releases. I propose this two variants: 1) Direct reference to the attribute 23 0008 A;23(D/)(G2/1):"-" 23(D/)(G1/1)):"-" 23(D/)(G0/1))2) Direct reference to attribute 23 and SET-DATE-xxx independent 0008 F;23;(D4Y);"-";:;23;(DM);(MR%2);"-";:;:;23;(DD);(MR%2);: Thanks, Stefano Chandru Murthi ha scritto: 0008 A;23(D/)]A;LPV(G2/1):'-':LPV(G0/1):'-':LPV(G1/1) where 23 = your date attr; ] is @VM LIST TKT.TEST ID.SUP F23 DTE 05:16:35pm 16 Jan 2007 PAGE 1 F23............ DTE......... 9141 1993-01-09 9020 1992-19-01 Chandru "Scott Deardorff" <smdamd (AT) bellsouth (DOT) net> wrote in message news:nScrh.1711$3t4.1695 (AT) bignews2 (DOT) bellsouth.net... I was looking for some help with output conversion codes, to see if there was a simple way to output dates in YYYY-MM-DD format when using SORT or LIST. CALLing a subroutine will probably be too slow for this particular application. Thanks, Scott Deardorff |
#6
| |||
| |||
|
|
I was looking for some help with output conversion codes, to see if there was a simple way to output dates in YYYY-MM-DD format when using SORT or LIST. CALLing a subroutine will probably be too slow for this particular application. Thanks, Scott Deardorff |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Thanks for all the replies. I tried most of the solutions, and went with a modified version of Stefano's first suggestion. 008 A;23(D4/)(G2/1):"-" 23(D4/)(G0/1)):"-" 23(D4/)(G1/1))Just had to flip the month and the day to get YYYY-MM-DD. Even though the D/ was defaulting to a 4 digit year, I also changed it to D4/ for consistency with our other standards. Found this worked great with D3NT and D3 Linux. Thanks again for the help! |
#9
| |||
| |||
|
|
How about formatting the date with "-" instead of "/", then you can get the mm-dd in one chunk with a single G0-2 instead of G0/1 + G1/1: 008 A;23(D4-)(G2-1):"-":23(D4-)(G0-2) (Thats the big advantage of the G correlative vs the FIELD function.) |
|
/Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 Scott Deardorff wrote: Thanks for all the replies. I tried most of the solutions, and went with a modified version of Stefano's first suggestion. 008 A;23(D4/)(G2/1):"-" 23(D4/)(G0/1)):"-" 23(D4/)(G1/1))Just had to flip the month and the day to get YYYY-MM-DD. Even though the D/ was defaulting to a 4 digit year, I also changed it to D4/ for consistency with our other standards. Found this worked great with D3NT and D3 Linux. Thanks again for the help! |
#10
| |||
| |||
|
|
Used to be. All FIELD functions have a chunk count as in x = FIELD(string,'*',2,3) |
![]() |
| Thread Tools | |
| Display Modes | |
| |