Display a past date then show how many days ago that is from current day?

Hi experts!

I need to display a past date (i.e. when the files were last uploaded) and then show how long ago that was from the current date.

The easiest way I could think of how to do this without a lot of coding was to display a date that was 3 days prior to the current date so I could just have the “days ago” statically set to say “3 days ago.”

So, is there a way to take the current date then display (on page load) and subtract 3 days and of course display that date in this format: Feb 14, 2020?

I found the “add(Day)” function but did not see a "subtract(Day) function.

Thanks!

Did you try using the addDays function but setting it to a negative value?

I just tried your suggestion and it worked! Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.