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] Trouble with changing date format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Trouble with changing date format
 Login/Join
 
Member
posted
Hello all,

I am having trouble converting the date format on one of my report fields.

I have added the following line in my .fex:

-SET &YM=EDIT(&DATE,'9999-99-99 99:99:99');

The report data that I am working with comes in the following format (here is an example):

2015/02/17 15:42:37.087


When I run the report to test, I get the following error:

0 ERROR AT OR NEAR LINE 5 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: 05/0-5/-15
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT


Any help would be greatly appreciated! Please let me know if you need any clarification on what I am trying to do.

Thanks,
Lewis

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 7 | Registered: April 13, 2015Report This Post
Virtuoso
posted Hide Post
Hi Lewis,

&DATE
is a reserved word in Focus

Try this and you will see the reason of your result:
-TYPE &DATE
-SET &YM=EDIT(&DATE,'9999-99-99 99:99:99');
-TYPE &YM


Use another variable name and it must work.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
Lewis, Check out the Functions manual, the EDIT function uses '9' for accept and '$' for reject.

You will need to add '$' to remove the slashes, colons and periods.

Also can you post the focus code, your error says FIELDNAME IS NOT RECOGNISED, which looks like it is in a TABLE request.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Thank you for your responses! The next part of my question was to be able to view the fields but one hour in the past.

I have managed to get this to work with the following code:

TABLE FILE ECM_KPI_IVU_TRANS_T
PRINT STATS_TIME
COMPUTE
MGHT/HYYMDS = HADD(STATS_TIME, 'HOUR', -1, 8, 'HYYMDS');
WHERE RECORDLIMIT EQ 2
END

When I run the .fex, I do get a column with the time correctly one hour in the past, however, the format still shows seconds.
How can I get rid of the seconds? Here is the output (First column is above, and second column is shown below it):

STATS_TIME
2015/02/17 15:42:37:087
2015/02/17 15:42:37:087

MGHT
2015/02/17 14:42:37
2015/02/17 14:42:37

Thanks in advance


WebFOCUS 8
Windows, All Outputs
 
Posts: 7 | Registered: April 13, 2015Report This Post
Virtuoso
posted Hide Post
Try
MGHT/HYYMDI


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
You should check out the manuals on describing data.

e.g. Display Options


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
MGHT/HYYMDI worked perfectly, thank you MartinY!


WebFOCUS 8
Windows, All Outputs
 
Posts: 7 | Registered: April 13, 2015Report 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] Trouble with changing date format

Copyright © 1996-2020 Information Builders