Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Need an MtrD format for a date value!

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Need an MtrD format for a date value!
 Login/Join
 
Silver Member
posted
It seems that the above format is not supported with new date formats. If I change it to MD/MtrDY then I get the proper output. But, drop off the Y and I either get the 2 digit month. Ie:
DEFINE FILE CAR
RUN_DATE/YYMD WITH COUNTRY =&YYMD;
RDATE/YYMtD=RUN_DATE;
DISPDATE/MtrDY = RDATE;
MD/MtrDY = RDATE;
END
TABLE FILE CAR
PRINT COUNTRY RUN_DATE MD
END
This works, remove the "Y" on MD and there is an error. The question is how do I get the date without the year? (I need this removed since I sort across Year)

Steve
 
Posts: 44 | Location: New York City | Registered: May 23, 2004Report This Post
<Pietro De Santis>
posted
Steve, I don't know if this will help you, but it appears that MtrD is the only date format that will not work, so you may be able to use one of the others that work.

Code:

DEFINE FILE CAR
TODAY/YYMD WITH BODYTYPE= '&DATEYYMD';
END

TABLE FILE CAR
PRINT
TODAY
TODAY/MtDYY
TODAY/MtDY
TODAY/DMY
TODAY/M
TODAY/Mt
TODAY/Mtr
TODAY/MtrDYY
WHERE RECORDLIMIT EQ 1
END

You may also convert the date to the newish date-time format and then extract the month and day from that converted date.
 
Report This Post
Silver Member
posted Hide Post
Alas, this is an inventory report showing week ending inventories compared between years, so there is an across sort on year, and I have to leave year out of the displayed date. I guess I have to cobble it together some other way.
 
Posts: 44 | Location: New York City | Registered: May 23, 2004Report This Post
<Pietro De Santis>
posted
DEFINE FILE CAR
TODAY/YYMD WITH BODYTYPE= '&DATEYYMD';
END

TABLE FILE CAR
PRINT
TODAY
TODAY/MTDYY
TODAY/MTDY
TODAY/DMY
TODAY/M
TODAY/MT
TODAY/MTR
COMPUTE M/M = TODAY; NOPRINT
COMPUTE MX/I2 = M; NOPRINT
COMPUTE D/D = TODAY; NOPRINT
COMPUTE DX/I2 = D; NOPRINT
COMPUTE MTR/A9 = DECODE MX (
01 January , 02 February, 03 March , 04 April
05 May , 06 June , 07 July , 08 August
09 September, 10 October , 11 November, 12 December ELSE ''); NOPRINT
COMPUTE MTRD/A12 = MTR || (' ' | EDIT(D));
TODAY/MTRDYY
WHERE RECORDLIMIT EQ 1
END
 
Report This Post
Silver Member
posted Hide Post
Thanks,
I think that will do it.

Steve
 
Posts: 44 | Location: New York City | Registered: May 23, 2004Report This Post
Expert
posted Hide Post
DEFINE
NEWTIME/HYYMDIA=DT(&YYMD 12:00AM);
NICEDAY/HMtD = NEWTIME;

will give you Aug 24 for NICEDAY
I can't get it to give you August 24
Mtr doesn't work.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Pietro De Santis>
posted
I like it!

NICEDAY/HMtD = NEWTIME;
NICEDAY2/HMTD = NEWTIME;

Capital MT gives the full month in title case!
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Need an MtrD format for a date value!

Copyright © 1996-2020 Information Builders