LAE

 View Only
  • 1.  Calculate Weeks Between Two Dates

    Employee
    Posted 03-14-2016 02:42

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: lauraw_21

    Hi

    Does anyone know how to calculate how many weeks sit between two dates.

    For example:

    Today = 1/3/16
    Invoice Date = 26/2/16
    Therefore Invoice Date is within 1 week of 1/3/16

    Invoice Date = 16/2/16
    Therefore Invoice Date is within 2 weeks of 1/3/16

    I would like a column that has a header of Weeks and returns 1 and 2 for the data examples above?

    Thanks
    Laura


  • 2.  RE: Calculate Weeks Between Two Dates

    Employee
    Posted 03-14-2016 14:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    The key here is to use the dateSubtract function (this gives you the days between two dates), and then dividing by 7 to get the weeks difference.
    Attachments:
    CalcDiff.brg


  • 3.  RE: Calculate Weeks Between Two Dates

    Employee
    Posted 04-21-2016 11:15

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Jaronowitz

    Hi Laura,

    In addition to the solution provided by Roger, please note that the recently released Accelerators library includes an accelerator (node) that you will find useful. It is called "Date Subtract' and enables you to calculate the number of days between two dates.

    The accelerator library is available to users of LAE 6.1 / LAE 6.0 who have installed LAL 6.1.44.0 / LAL 6.0.44.0.

    The accelerators can be made visible in the node palette for the current data flow by adding the accelerators as a base library:
    In the BRE menu click on Graph -> Edit Base Libraries...
    Then click on the 'New' icon in the Base Libraries dialogue panel
    Type 'accelerators' into the new empty row (without the quotes) and click OK
    The accelerators should now be visible in the different categories of the palette.

    if you have any questions or comments regarding the accelerator library, please post it in the accelerator forum:
    http://community.lavastorm.com/forums/45-Accelerators