Skip to main content
Solved

Need formula to return name of the month that was 30 days back

  • December 2, 2020
  • 2 replies
  • 19 views

Forum|alt.badge.img+4

i thought it would be something like DATETIME_FORMAT(TODAY(-30 DAYS), ‘MMMM’)
=> October
or MONTH(TODAY(-30 DAYS) Its the subtracting days part i dont understand
simple i know but im at a loss to make the stupid red letters go away

OR how can i find out what date was 30 days ago and format that? i also need this for 60 days and 90 days to populate on a notice thats printed from page designer and sent certified mail. but i am competent enough to parse those myself once someone lets me cheat off their homework for the first one.

Best answer by kuovonne

The TODAY() function only returns the current day. It does not take an argument.
To subtract 30 days from today, add a negative number with the DATEADD() function.

DATEADD(TODAY(), -30, 'days')

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • December 2, 2020

The TODAY() function only returns the current day. It does not take an argument.
To subtract 30 days from today, add a negative number with the DATEADD() function.

DATEADD(TODAY(), -30, 'days')

Forum|alt.badge.img+4
  • Author
  • Inspiring
  • December 2, 2020

The TODAY() function only returns the current day. It does not take an argument.
To subtract 30 days from today, add a negative number with the DATEADD() function.

DATEADD(TODAY(), -30, 'days')

lmaoooo you dont know how long i have spent on this.