date conversion


i have list of dates, stored inside variable, $a.  i'd convert them different format.  the problem when use parseexact, different length of month or day fields cause error.  can me figure out how work out following list:

date
----
11/28/2011
11/30/2011
12/2/2011
12/5/2011
12/7/2011
12/9/2011

would converted format "november 28, 2011"?

thanks assistance!


this works me data:

$dates = gc dates.txt foreach ($date in $dates) {[datetime]::parseexact($date,'m/d/yyyy',$null)}


grant ward, a.k.a. bigteddy

what's new in powershell 3.0 (technet wiki)



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client