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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     JDE / PeopleSoft / Oracle World Date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
JDE / PeopleSoft / Oracle World Date
 Login/Join
 
Gold member
posted
I'm working with World and I'm trying to find the best way to convert the date field. On our system the date is in P7 format. Here is an example date.
105135
1 = Y2K (fix) 1=2000
05 = Year
135 = day of year

Anyone want to chime in?

TIA


------------------------------------------
DevStudio 8.2.03
WFS 8.2.03
 
Posts: 86 | Location: Atlanta | Registered: May 10, 2007Report This Post
Platinum Member
posted Hide Post
try this:
DEFINE FILE F1501B
SEF1 /A6 = EDIT(NEEFTB);
SEF2 /A5 = EDIT(SEF1,'$99999');
SEF3 /I5 = EDIT(SEF2);
SEF4 /I6 = GREGDT (SEF3,'I6');
SEF5 /A6 = EDIT (SEF4);
SEFMM /A2 = EDIT (SEF5,'$$99$$');
SEFDD /A2 = EDIT (SEF5,'$$$$99');
SEFYY /A2 = EDIT (SEF5,'99$$$$');
SEFCENT /A2 = IF SEFYY GE '90' THEN '19' ELSE '20';
SEFDATE1 /A8 = SEFCENT||SEF5;
SEFDATE2 /I8YYMD = EDIT(SEFDATE1);
NEEFTB_DATE /MDYY = SEFDATE2;
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report This Post
Guru
posted Hide Post
I think this will work in 4 steps. I've assumed if the year is not 20nn that it is 19nn.

 DEFINE FILE EMPDATA
DATE_INPUT/P7      = 105135;
DATE_INT/I5L       = IMOD(DATE_INPUT, 100000, DATE_INT);
DATE_INT_YYJ/I7    = IF ((DATE_INPUT-DATE_INT)/100000) EQ 1 
                      THEN 2000000 + DATE_INT 
				       ELSE 1900000 + DATE_INT;
DATE_I8YYMD/I8YYMD = GREGDT(DATE_INT_YYJ, 'I8YYMD');
DATE_YYMD/YYMD     = DATE_I8YYMD;
END
TABLE FILE EMPDATA
PRINT DATE_INPUT 
      DATE_INT
	  DATE_INT_YYJ
	  DATE_I8YYMD
      DATE_YYMD
BY PIN
WHERE RECORDLIMIT EQ 1
END 


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Expert
posted Hide Post
As Karen intimates, the date you have is almost a julian date so correcting the year portion so that it is a full julian date will provide your answer.

You could also bypass the first two steps in Karen's excellent solution by adding 1900000 to your input date, within the GREGDT step - DATE_I8YYMD/I8YYMD = GREGDT((1900000 + DATE_INPUT), 'I8YYMD');

But as Karen has said, it all depends upon how the 1900 dates are represented.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
To expand on Karens code and to allow a 1900 date to be checked, try this code -
APP FI INDATES DISK INDATES.MAS (LRECL 80
-RUN
-WRITE INDATES FILE=INDATES,SUFFIX=FOC
-WRITE INDATES SEGNAME=SEG1
-WRITE INDATES FIELD=DATE_INPUT,   ,P7   ,P7   , $
CREATE FILE INDATES
MODIFY FILE INDATES
FIXFORM DATE_INPUT/A7
DATA
097256
105135
END
DEFINE FILE INDATES
  DATE_I8YYMD/I8YYMD = GREGDT((1900000 + DATE_INPUT), 'I8YYMD');
  DATE_YYMD/YYMD     = DATE_I8YYMD;
END
TABLE FILE INDATES
  PRINT DATE_INPUT 
        DATE_I8YYMD
        DATE_YYMD
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Trob,

I perform the date conversions when creating the metadata. This is an example from the Business Unit Master:

FIELDNAME=MCD1J1, ALIAS=MCD1J, USAGE=YYMD, ACTUAL=DATE,
TITLE='MCD1J', $
FIELDNAME=MCD1J2, ALIAS=MCD1J, USAGE=YYMD, ACTUAL=DATE,
TITLE='Planned, Start', DESCRIPTION='Planned Start Date', $


WebFOCUS 8.1.05/PMF 8.1.4,Tomcat,IIS,Windows/iseries,sql server 2008,Excel/ PDF/HTML
 
Posts: 65 | Registered: July 11, 2006Report This Post
Gold member
posted Hide Post
Brilliant solution with the adding 1900000, that didn't cross my mind. I don't have any pre-y2k data but it will work for 2100 and above. I'm guessing pre-y2k would just be without the hundred thounsand, 105135 = 2005/135day and 5135 would be 1905/135day.

Thanks for all the help!


------------------------------------------
DevStudio 8.2.03
WFS 8.2.03
 
Posts: 86 | Location: Atlanta | Registered: May 10, 2007Report This Post
Member
posted Hide Post
JDE stores dates in Julian format. If you don't want to have to do things manually, there is a JDE World Adapter that can automatically generate the synonyms for you. It would take care of julian to gregorian date conversion, decimal conversion, UDC lookups, and security integration for all your JDE World tables.

Regards,
Richard
 
Posts: 8 | Location: Corporate | Registered: October 07, 2006Report 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     JDE / PeopleSoft / Oracle World Date

Copyright © 1996-2020 Information Builders