I'm trying to figure out how to add all the dates between 08/27/14 to 10/27/14 to an array in the yyyyMMdd format. Can someone please point me in the right direction.
Thanks guys, as always once I posted on the forum an idea pops into my head. This seems to work for what I need.
$startDate = Get-Date 08-27-14
$endDate = Get-Date 10-27-14
while($startDate -le $endDate){
$nextDate = Get-Date $startDate -format yyyyMMdd
write-host $nextDate
$startDate = $startDate.AddDays(1)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With