how to get a date of past time

SKV

Active Member
Joined
Jan 7, 2009
Messages
257
Hi,

I want to get a date 4 weeks back from a said date. So if I have a date of April 15, I should get output as March 15.

Please suggest the method to get this output.

Thanks
Sachin
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
There are probably many ways, but here's one:

14 days ago: (Now())-14

so this is taking the current date and time and subtracting 14 days...you can make it any number of days you want.
 
Upvote 0
Just got a better way to do it. - use dateadd()

There are probably many ways, but here's one:

14 days ago: (Now())-14

so this is taking the current date and time and subtracting 14 days...you can make it any number of days you want.
 
Upvote 0
took me a minute to figure out how on earth DateAdd() would give you a date 1 month ago...but I supposed if you specify a negative number then it would.

:biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,222
Members
448,877
Latest member
gb24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top