3 Replies Latest reply: May 15, 2014 10:07 AM by Grant Perkins RSS

    Calculate 28 days from today???

    gico1972 _

      Need some help in creating a filter that will only return records that are 28 days and greater than today's date.

       

      Many Thanks

        • Calculate 28 days from today???
          Joe Berry

          Unfortunately, I am not where I have access to v8, but I beleive that the Today() function has been around for a long time.  Here is the code for your filter:

           

          DateField<Today()-28

           

          Hope that helps.

            • Calculate 28 days from today???
              Nick Osdale-Popa

              Actually, that would be days less than 28 days in the past.  The filter should be:

               

              DateField >= Today()+28

                • Calculate 28 days from today???
                  Grant Perkins

                  gico1972,

                   

                  Choose your formula from those offered above, with or without inclusive dates!

                   

                  To be honest I was not sure which way you wanted to go with the date comparison but figured that having seen one way you could guess the other if required.

                   

                  It's probably worth mentioning that the Help file has some examples of how such comparisons and calculations can be made, either from variables like 'Today' or by comparing two fixed dates, a combination of fixed and variable and so on.

                   

                  You could also set up the model to prompt the user for the date(s) or number of days to calculate for. If you gain access to a later version of Monarch, especially V10, you will find even more date and age calculation functions to deploy should you need them. I just thought I would mention that for possible future interest.

                   

                  HTH.

                   

                   

                  Grant