Here is the delima, I need to get yesterdays day in the format of yymmdd. That's easy if you want todays date:
get-date -uformat %y%m%d
Great! Now how do I get yesterdays date?
will get me
Wednesday, June 22, 2011 8:47:51 AM
But, I cant do
(get-date).AddDays(-1) -uFormat %y%m%d
Nor can I do
(get-date -uFormat %y%m%d).AddDays(-1)
Nor is there a .Net date/time format of yymmdd. Any suggestions would be appreciated. Thank you!
So if i wanted to get the current date to a format of YYYY.MM.DD, I can get it by
Since i have file names that contain the below i need only to get those with a certain current date embedded.
Update_YYYYMMDDHHMMSSMS.log or Update_2014021802113801.log