1 Reply Latest reply on Feb 28, 2011 4:34 PM by philmodjunk

    Where do I pull the current date for calculations, searches and so on ?

    PecCars

      Title

      Where do I pull the current date for calculations, searches and so on ?

      Post

      I couldn't find a function for obtaining the current month. As this is a basis for many of the calculations in my app, what I have done is created a global variable called $$CurrentMonth that I use throughout the app. Is there a way of calculating the current month from // ? or something similar ?

        • 1. Re: Where do I pull the current date for calculations, searches and so on ?
          philmodjunk

          If you want the number for the current month, use Month ( Get ( currentDate ) ). If you want the name of the current month, use MonthName ( get ( CurrentDate ) ).

          You may also find one of these calculations in a calculation set to return date useful:

          DateField - Day ( DateField ) + 1

          Date ( Month ( Datefield ) ; 1 ; Year ( Datefield ) )

          Both return the date of the first day of the same month and year as the date in DateField and such a field can be useful for searches, sorts and as a relationship key for working with all records of the same month and year.