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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
@tod
 Login/Join
 
Platinum Member
posted
How would I convert the system time from military to Normal Time (AM PM

Webfocus 7.1.1


Dan Moyer


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
 
Posts: 147 | Registered: June 24, 2006Report This Post
Expert
posted Hide Post
You're talking about converting most-of-the-world time to mostly-north-america time?

I am assuming you want to do this in Dialogue Manager. It seems ridiculous, but this is the quickest way I could find:

-SET &ECHO=ALL;
-SET &H1 = EDIT(&TOD,'99');
-SET &H2 = IF &H1 GT 12 THEN &H1 - 12 ELSE &H1;
-SET &M = IF &H1 GT 12 THEN ' PM' ELSE 'AM';

-SET &TOD2 = &H2 | EDIT(&TOD,'$$$:99$:99') | &M;
-TYPE &TOD2


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis,

Your technique is good but you lose the leading zero (0).

Just an FYI in case you want the leading zero for hours less than 10.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Platinum Member
posted Hide Post
Beware of the &TOD trap. UNLESS a SET DATETIME = NOW has been issued &TOD is the time the “thread” started, NOT the current time. This can be an issue if you are logging events, but for time stamps on a report the start up time is adequate.

I generally use

-SET &NOW=HHMMSS(‘A8’);

To get the current time.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Expert
posted Hide Post
Mickey, I realized that the leading zero dropped, but I thought that if someone wants to display the time in AM/PM, then they probably don't need the leading zero Smiler

Jim, I usually use HHMMSS, but using &TOD isn't a "trap" since my reports usually take 15 seconds or under to run Smiler

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders