Search code examples
datecrystal-reports

current date minus one month crystal report


How to calculate current date(month) minus one month in crystal report?


Solution

  • To subtract one month from the current date use

    DateAdd ("m", -1, CurrentDate)

    If you just want the month number use this

    Month(DateAdd ("m", -1, CurrentDate))

    If you are trying to get the month name use this

    MonthName(Month(DateAdd ("m", -1, CurrentDate)))