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     A question about DATEDIF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
A question about DATEDIF
 Login/Join
 
<Christopher>
posted
Hi there,

I have a question about DATEDIF. In the HTML-manual I have this function is not described. Can anyone post me the list of parameters? I've heard of 'D', 'WD' and 'BD'. What do they do?

Thanks a lot
boerzel
 
Report This Post
Platinum Member
posted Hide Post
DATEDIF doc. from:


[/list]

[/list]


DATEDIF(from_date, to_date, 'unit'[, outfield])

where:

  • from_date - Date - Is the start date from which to calculate the difference.
  • to_date - Date - Is the end date from which to calculate the difference.
  • unit - Alphanumeric - Is one of the following enclosed in single quotation marks:
    [list]

  • Y - indicates a year unit.
  • M - indicates a month unit.
  • D - indicates a day unit.
  • WD - indicates a weekday unit.
  • BD - indicates a business day unit.


  • outfield - Alphanumeric - Is the field that contains the result. This value is required only for Maintain.
    [/list]
    Regards,
    Mikel
  •  
    Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
    <Christopher>
    posted
    Hallo Mikel,

    thanks a lot! But now I've got the next problem. How am I supposed to change an alphanumeric field like '010504' into a DMY field? The DATEDIF function needs fields formatted as date.

    Thanks a lot
    Christopher
     
    Report This Post
    Platinum Member
    posted Hide Post
    For example:


    SET DEFCENT = 19
    SET YRTHRESH = 50

    TABLE FILE CAR
    PRINT
    COMPUTE DATEA/A6DMY = '010504' ;
    COMPUTE DATE1/DMYY = DATEA ;
    COMPUTE DATE2/DMYY = &DMYY ;
    COMPUTE DATE3/I5 = DATEDIF(DATE1, DATE2, 'BD') ;
    BY COUNTRY
    END

    Regards,
    Mikel

    This message has been edited. Last edited by: <Mabel>,
     
    Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
    <Christopher>
    posted
    Mikel,

    thank you very much, works very well now.

    Best regards
    Christopher
     
    Report 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     A question about DATEDIF

    Copyright © 1996-2020 Information Builders