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] DATEADD(DATE, 'M', 1.999)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DATEADD(DATE, 'M', 1.999)
 Login/Join
 
Member
posted
I am trying to use DATEADD(DATE, 'M', 1.999) in my report. Below is the report source code.

I found the function DATEADD @
https://infocenter.information...ce%2Fdatasource4.htm

I got an error like

Change Case
>BY>
BY DIM_MONTH


TABLE FILE SQLOUT
SUM
IT_DAYS
IT_DAYSADJ
SPT_DAYS
SPT_DAYSADJ
COMPUTE RUN_TOT/D12.2M = IF OFF_ENGAGE_ID
EQ LAST OFF_ENGAGE_ID THEN ( RUN_TOT + IT_DAYSADJ + SPT_DAYSADJ )
ELSE IT_DAYSADJ + SPT_DAYSADJ; AS 'IT_DAYS_TOTAL'
REL_DATE_ADJ

REL_DATE/MDY = DATEADD(REL_DATE_ADJ, 'D', 1)

BY DIM_MONTH
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END



I appreciate if you advise me how to add a number to a date.
  

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8.0.0.8
Windows, All Outputs
 
Posts: 13 | Location: WebFocus 8.0.0.8 | Registered: May 24, 2016Report This Post
Member
posted Hide Post
It is very helpful. Thank you very much for you advice.


WebFocus 8.0.0.8
Windows, All Outputs
 
Posts: 13 | Location: WebFocus 8.0.0.8 | Registered: May 24, 2016Report This Post
Virtuoso
posted Hide Post
quote:
COMPUTE RUN_TOT/D12.2M = IF OFF_ENGAGE_ID EQ LAST
OFF_ENGAGE_ID THEN ( RUN_TOT + IT_DAYSADJ + SPT_DAYSADJ ) ELSE IT_DAYSADJ + SPT_DAYSADJ;
AS 'IT_DAYS_TOTAL'
REL_DATE_ADJ

DATEADD(DATE, 'M', 1.999)


You have DATEADD in the middle of the code without any of the required COMPUTE syntax.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
CD

You need to use that in a DEFINE or a COMPUTE statement and to add 1.99 to a month does seem valid, it should be 1 or 2


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
quote:
DATEADD(DATE, 'M', 1.999)


Thank you for your time and you advice. I am new to DATEADD function and App Studio. Looks like that it is a little hard for me understand your advice.

I also try DATEADD(REL_DATE_ADJ, 'D', 1). It doesn't work either.

My goal is to add a new column that is a date (REL_DATE_ADJ) minus a number. The number is from

COMPUTE RUN_TOT/D12.2M = IF OFF_ENGAGE_ID
EQ LAST OFF_ENGAGE_ID THEN ( RUN_TOT + IT_DAYSADJ + SPT_DAYSADJ )
ELSE IT_DAYSADJ + SPT_DAYSADJ; AS 'IT_DAYS_TOTAL'


WebFocus 8.0.0.8
Windows, All Outputs
 
Posts: 13 | Location: WebFocus 8.0.0.8 | Registered: May 24, 2016Report This Post
Member
posted Hide Post
Thank you. I add all calculation in my SQL statement. No issue anymore.


WebFocus 8.0.0.8
Windows, All Outputs
 
Posts: 13 | Location: WebFocus 8.0.0.8 | Registered: May 24, 2016Report 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] DATEADD(DATE, 'M', 1.999)

Copyright © 1996-2020 Information Builders