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     [SOLVED] Current Date and Time

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Current Date and Time
 Login/Join
 
Gold member
posted
I'm trying to get the current date and time using the code below:
-SET &TODAY=EDIT(&YYMD, '99999999');
-SET &TIME=HHMMSS('A8');
DEFINE FILE CONTACT
TODAY/YYMD=&TODAY;
TIME1/A8=&TIME;
END
TABLE FILE CONTACT
PRINT
TODAY
TIME1
END

But I receive this error every time:
0 ERROR AT OR NEAR LINE 5 IN PROCEDURE mav_ext_manual_lca
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: 10.39.59
0 ERROR AT OR NEAR LINE 10 IN PROCEDURE mav_ext_manual_lca
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: TIME1
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT

What am I doing wrong?

This message has been edited. Last edited by: Kerry,


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Expert
posted Hide Post
Alpha columns require quotes...

TIME1/A8='&TIME';


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
You may also have to add quotes for the yymd field ( TODAY/YYMD='&TODAY'; ).


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Hey Gamp,

DM treats the TODAY output the same; actually, the answer comes via multiple paths up the WebFOCUS mountain:

You can do this:
 
-SET &TODAY=EDIT(&YYMD, '99999999');
-SET &TIME= '''' || HHMMSS('A8') | '''';
DEFINE FILE WHATEVER
   TIME1/A8      = &TIME;


OR, my response above,

OR

  
DEFINE FILE WHATEVER
 CUR_DATE/A10  = '&DATEYYMD';
 TIME1/A8      = HHMMSS('A8');


Whatever floats your boat!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
Yeah Tom, I know, there are many ways to do something right (or wrong of course).
As long as the bottom line is that the problem gets solved ....


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
Do you really want to get the date and time separately? If not, you can use the HGETC function.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Gold member
posted Hide Post
HGETC worked great! Thanks!!


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report 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     [SOLVED] Current Date and Time

Copyright © 1996-2020 Information Builders