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
Windows Server > Windows PowerShell
Comments
Post a Comment