1

My script pulls the software installation date and puts it into $obj.InstallDate. The value returned is in the format of 20131227. I want to convert this to December 27, 2013 but can't get this to work.

The Get-Date in powershell doesn't work for me. What do I need to do?

Habanagold
  • 41
  • 1
  • 2
  • 8

1 Answers1

0

Try something like this $DateValue = 20131228

Get-Date -Year $DateValue.ToString().Substring(0,4) -Month $DateValue.ToString().Substring(4,2) -Day $DateValue.ToString().Substring(6,2) -Format "MMMM dd, yyyy"
Sean Rhone
  • 250
  • 2
  • 7