Forum Discussion
Eric_J_Hansen
9 years agoQrew Cadet
This will get you the date of the first day of last month:
Adjustmonth(Firstdayofmonth(today()),-1)
This will get you the month number for last month:
Month(Adjustmonth(Firstdayofmonth(today()),-1))
Which would return '3' given today is in April. You can create a formula text field to convert the month number to text, something like:
Case(month(Adjustmonth(Firstdayofmonth(today()),-1)),
1,"Jan",
2,"Feb",
3,"Mar",
Etc,
Etc
)
This would give you the last day of last month:
Adjustmonth(lastdayofmonth(today()),-1)
This will give you the number of days last month:
Weekdaysub(
Adjustmonth(lastdayofmonth(today()),-1),
Adjustmonth(Firstdayofmonth(today()),-1))
+1)
Adjustmonth(Firstdayofmonth(today()),-1)
This will get you the month number for last month:
Month(Adjustmonth(Firstdayofmonth(today()),-1))
Which would return '3' given today is in April. You can create a formula text field to convert the month number to text, something like:
Case(month(Adjustmonth(Firstdayofmonth(today()),-1)),
1,"Jan",
2,"Feb",
3,"Mar",
Etc,
Etc
)
This would give you the last day of last month:
Adjustmonth(lastdayofmonth(today()),-1)
This will give you the number of days last month:
Weekdaysub(
Adjustmonth(lastdayofmonth(today()),-1),
Adjustmonth(Firstdayofmonth(today()),-1))
+1)