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.
What is the field type? I'm using TIMESTAMP/HYYMDS = ...
and I was able to use the MAX.TIMESTAMP and get it to return correctly. But I am using WebFocus 7.61 and perhaps it has changed in the recent versions (seeing you're using 5.3)
Prod: WebFOCUS 7.6.4 - Self Service - Windows Server2003 - Apache Tomcat 5.5 Dev: WebFOCUS 7.6.4 - Self Service - Windows XP SP2 - Apache Tomcat 5.5
We're on 7.1.6 and we use MAX on alpha fields all the time with no problem. I can't think of an example where we've used it on a date field, but I'm sure we have somewhere along the way. Do you have some code we can look at?
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I presume you mean MAX(date1,date2,date3). No standard function and the alternative, which I have done is horrible, really horrible. You can have it if you are desperate!
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
You meant the MAX function instead of the MAX prefix, right? Was misdirected by Leo's comment - but is there a reason why the prefix wouldn't work instead?
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I want to use the MAX FUNCTION to determine the maximum value from multiple columns in one ROW. The MAX function works with numeric columns only, it would be nice to have an HMAX function...
You're right - make sense that there should be something like that. To get around it, you could create a second column for each date subtracting it from current date/time. This would give you a numeric column that you could use with the MIN function. Or you could convert each date column to JULIAN which is a numeric format that you could use with MAX. (But I guess that would only work for dates, not date/time)
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
DNOW/HYYMDm=HGETC(10,'HYYMDm'); DIFF1/D12=HDIFF(DNOW,DATE1,'DAY','D12'); DIFF2/D12=HDIFF(DNOW,DATE2,'DAY','D12'); DIFF3/D12=HDIFF(DNOW,DATE3,'DAY','D12'); MINDIFF/D12=MIN(DIFF1,DIFF2,DIFF3); MAXDATE/YYMD=IF MINDIFF EQ DIFF1 THEN HDATE(DATE1,'YYMD') ELSE IF MINDIFF EQ DIFF2 THEN HDATE(DATE2,'YYMD') ELSE IF MINDIFF EQ DIFF3 THEN HDATE(DATE3,'YYMD') ELSE ' ';
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007