export-counter cmdlet exports date in wrong timestamp format when written to a csv file - by James Jiao

Status : 


Sign in
to vote
ID 677402 Comments
Status Active Workarounds
Type Bug Repros 2
Opened 6/28/2011 3:41:29 PM
Access Restriction Public


the export-counter cmdlet writes the sampling timestamp column in the US format (MM/dd/yyyy) to a csv file - as viewed in Notepad - regardless of which culture is currently in influence. This creates many issues with importing/using the data. (other cmdlets such as get-counter and get-date utilize the current culture correctly and subsequently return the correct date format).

Is this a bug or by design? If by design, where is this... exceptional feature documented and what's the rationale behind such design? Note in the reproduction steps that the get-counter statement returns the correct date format (
Sign in to post a comment.
Posted by Elvar B on 4/10/2012 at 2:09 PM
ran into the same problem

Using get-counter to get cpu and memory stats from the host. I then add the results as a string/line in a custom csv file.

When I read the csv file back and turn the timestamp value back into a [time] object the months and days are mixed up.

Using Powershell 3.0 preview 2
Posted by James Jiao on 3/19/2012 at 3:59 PM
Does anyone from Microsoft actually check these bug reports?