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     Focus - date computation

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Focus - date computation
 Login/Join
 
Silver Member
posted
It might be a simple query, but due to lack of manual i am facing this problem, moreover i m using focus for first time, so can anyone help.

I have a date field in the input file in the format YMD and I need to add one year to it
what i did is:

define file f1
newdate/ymd=olddate +365

but how do i handle leap years in this case.
can there be other simple way of adding one year to input date field which takes care of the leap year.


FOCUS 7.1.1/ MF(OS/390)
 
Posts: 40 | Location: Chennai, India | Registered: January 31, 2007Report This Post
Platinum Member
posted Hide Post
There's a DATEADD function:
NEWDATE/YMD = DATADD(OLDATE, 'Y', 1);

Since you have a web connection you can go to the IB tech support website and download manuals for additional info.
 
Posts: 118 | Location: DC | Registered: May 13, 2005Report This Post
Virtuoso
posted Hide Post
the manuals can be downloaded in PDF. very good to use that you can search in teh manual first.

but here is the answer

DATEADD(OLDDATE, 'Y', 1)

and you can understand what it would be if you want to add a month or a day or want to substract a day or a month or a business day.

good luck




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report 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     Focus - date computation

Copyright © 1996-2020 Information Builders