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     Way to convert Julian date to a normal date MM/DD/YY ??

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Way to convert Julian date to a normal date MM/DD/YY ??
 Login/Join
 
Gold member
posted
I looked through the various functions in Webfocus and can't seem to find one that will convert my Julian Dates to standard MM/DD/YY date format.

Is there a way?


Rob M.
Target Corporation

WF 7.1.4
 
Posts: 73 | Location: Minneapolis, MN | Registered: August 08, 2007Report This Post
Guru
posted Hide Post
http://techsupport.informationbuilders.com/sps/71161021.html

Sayed


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
Here is a more current example:

 
SET DEFCENT=19
SET YRTHRESH=50

TABLE FILE EMPLOYEE
PRINT HIRE_DATE
COMPUTE JULIAN/I5 = JULDAT(HIRE_DATE, JULIAN); 
COMPUTE GREG_DATE/I8 = GREGDT(JULIAN, 'I8');
COMPUTE DATE_GREG1/I8YYMD = GREG_DATE;
COMPUTE DATE1_CONV1/MDYY = DATE_GREG1;
COMPUTE TOM_JUL/I5 WITH LAST_NAME = 08163;
COMPUTE TOM_GREG/I8 WITH LAST_NAME= GREGDT(TOM_JUL,'I8');
COMPUTE DATE_GREG2/I8YYMD = TOM_GREG;
COMPUTE DATE_CONV2/MDYY = DATE_GREG2;
BY LAST_NAME BY FIRST_NAME
WHERE DEPARTMENT EQ 'PRODUCTION';
END
-EXIT
 


Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Hi Tom,

Unfortunately it did not work. See below for results....

GLDGJ is the original julian date in the master file 1.
GLDATE2 is a defined field in my master file 1 DEFINE GLDATE2/I8 = GREGDT ( GLDGJ , GLDATE2 )

Then the rest of the columns are a result of the computes from your example above. What's wrong?

GLDGJ
108157

GLDATE2
1080605

JULIAN
0

GREG_DATE
0

DATE_GREG1
1900/12/31

DATE1_CONV1
field was blank


Rob M.
Target Corporation

WF 7.1.4
 
Posts: 73 | Location: Minneapolis, MN | Registered: August 08, 2007Report This Post
Expert
posted Hide Post
Rob,

It looks you have a 1 in the 1st byte to identify a century: Correct??

If so,

DEFINE GLDGJ_X/I5 = EDIT(EDIT(GLDGJ,'$99999'));

The rest should process fine...

OR DECODE the 1st byte to it's definition.

Julian dates are ususally 5 (08164) or 7 (2008164) bytes...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Try this for a fast (not using subroutine) way to convert your julian dates:


DEFINE FILE CAR                         
MYJUL/I8 WITH COUNTRY = 108157 ;        
MYYR/I4 = MYJUL/1000 ;                  
MYDAY/I3 = MYJUL - (MYYR*1000) ;        
MYI8/I8YYMD = (MYYR+1900)*10000 + 0101 ;
MYDAT/MDYY = MYI8 ;                     
MYDAT      = MYDAT + MYDAY - 1;         
END                                     
TABLE FILE CAR                          
PRINT MYJUL MYYR MYDAY MYI8 MYDAT       
END                                      


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report 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     Way to convert Julian date to a normal date MM/DD/YY ??

Copyright © 1996-2020 Information Builders