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
Trouble with dates
 Login/Join
 
Member
posted
This problem is about to drive me crazy.

I have a date (in HMDYY format) that I pull from the database and what I want to do is find the difference (in days) between this date and today.

Should be simple. But nope.

I've tried using DATEDIF, but I either get 0 or 38 thousand something. I've tried changing formats of the dates about a dozen different ways, but still no go.

Any help would be much appreciated.

-Stephanie
 
Posts: 15 | Location: Texas | Registered: July 19, 2005Report This Post
Virtuoso
posted Hide Post
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
Try this.

DEFINE FILE XXX
START_DATE/YYMD = &YYMD;
DB_DATE/YYMD = HDATE(your db date, 'YYMD');
DAYS_DIFF/I8 = DATEDIF(START_DATE, DB_DATE, 'D');
END
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report This Post
Member
posted Hide Post
Thank you, thank you, thank you! That solved my problem. I knew it couldn't be as difficult as I was making it.

-Stephanie
 
Posts: 15 | Location: Texas | Registered: July 19, 2005Report This Post
Guru
posted Hide Post
There are also subroutines specific date/time formatted fields. In this case HDIFF would've been useful, as well.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Platinum Member
posted Hide Post
You might want to consider looking into the book
(almost) 1001 Ways to Work with Dates in WebFOCUS. It gives lots and lots of examples of date manipulations - along with a cd containing all of the examples.

Vivian
www.aviter.com
 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders