Visokio website     Downloads     Video tutorials     KnowledgeBase  
Formulae: Calculating differences in dates dynamically? - Visokio Forums
Formulae: Calculating differences in dates dynamically?
  • Simon_Maynard January 8, 2013 7:01AM
    Hi,

    I am using a "Record filter" block to filter for data relating to today’s date minus 14 days (Example 08/01/2013 - 25/12/2012). At the moment I am manually changing the date everyday.

    Is there a way of using a formula that automatically updates every time I open the file so the output table always only contains the last 14 days.
    In Excel I would use: =TODAY()-14

    The source of the data is from a database in which I query at the beginning of the process. I was hoping to add a line to the SQL at this stage to only pull in the last 14 days but again I could not find an option to do so.

    Please could someone let me know how I can do this?
  • 1 Comment
  •     paola January 8, 2013 8:06AM
    In the Field organiser block add formula field
    IF(
    (DATEDIFF([Date], TODAY, "day"))>14
    ,null, 1)

    Then with Record filter operation only filter in fields with "1".

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership