Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Date today plus 14 formated like 08 May 2015

$
0
0

I’m trying to get the date +14 days as a string to put in an email.  In the past I’ve used  $60Days=((Get-Date).AddDays(-60)).Date to get the date 60 days ago but I didn’t need to format it with something likeGet-Date-formatD If I try:

 

$Plus14Days=((Get-Date-formatD).AddDays(+14)).Date

 

It errors on method invocation, so what have I got wrong?

Thanks


Viewing all articles
Browse latest Browse all 6937

Trending Articles