If you want to convert PerfMon CSV timestamps to readable dates in Excel, you need two things. First, a real CSV, which relog.exe produces from a .blg. Second, a step that turns the text column into an Excel date-time serial number. Formatting the cell as a date does nothing to text that Excel already parsed wrong. You have to re-parse it.
The short answer is to put =DATE(MID(A2,7,4),LEFT(A2,2),MID(A2,4,2))+TIMEVALUE(MID(A2,12,8))+VALUE(RIGHT(A2,3))/86400000 in a helper column (this assumes the exact unquoted MM/DD/YYYY HH:MM:SS.fff layout; see the milliseconds section below for quoted or variable-precision fields). Then apply the custom format yyyy-mm-dd hh:mm:ss.000. For big logs, use Power Query’s Using Locale type change instead. The sections below cover what breaks along the way.
Prerequisites and Environment
- Windows Server or Windows client with Performance Monitor. relog.exe is a built-in Windows command-line tool, so there’s nothing extra to install (Microsoft archived PerfMon guide).
- Microsoft Excel desktop on Windows or Mac. Menu paths here match Excel for Microsoft 365. For Microsoft 365 Apps on Windows, the newest Current Channel build at publication is Version 2611 (Build 20625.20142, November 23, 2026) per the Current Channel release notes. Monthly Enterprise, Semi-Annual, and perpetual Office builds lag behind it. Excel for Mac updates on its own schedule; check Excel > About Excel for your exact build, or see the Office for Mac release notes.
- Windows PowerShell for the
Import-Countermethod. It ships with the Microsoft.PowerShell.Diagnostics module in Windows PowerShell 5.1 (Import-Counter documentation). - Mac users:
relog.exeis a Windows command-line tool, andImport-Counteris part of Windows PowerShell, so neither runs natively on macOS. Do the conversion on the Windows box, then copy the CSV over an SMB share or a USB flash drive.
Every formula below assumes the MM/DD/YYYY HH:MM:SS.fff layout PerfMon writes. The worked example is the string 05/06/2022 07:45:03.341. Check your file’s first data row against that pattern before you use any formula.
The commands and sample output blocks that follow illustrate the expected format rather than a transcript from one specific machine. Your own build numbers, sample counts, and values will differ, so treat the shown text as a pattern to match, not a byte-for-byte guarantee.
How the formulas were checked: each formula was worked through against the example string 05/06/2022 07:45:03.341, character position by character position, and the expected serial values were calculated independently (44687.32295 for seconds precision, 44687.322955 with milliseconds). That’s a worked check of the logic, not a recorded Excel session on your build, so confirm the first few converted rows of your own file with the Verify steps in each section.
Quick Reference: Symptom to Fix
| Symptom | Likely Cause | Quick Fix |
|---|---|---|
File is .blg, Excel can’t open it | Data Collector Set defaults to binary | relog log.blg -f CSV -o log.csv |
| Timestamps left-aligned, won’t sort | Column imported as text | Helper-column formula or Power Query type change |
| May 6 shows as June 5 | Excel used your regional date order | Power Query Using Locale > English (United States) |
| Milliseconds gone | Default time format hides fractions | Millisecond formula + yyyy-mm-dd hh:mm:ss.000 |
##### in converted cells | Column too narrow or negative date | Widen column, then check the source pattern |
#VALUE! from formula | Cell is already a number, or has quotes | Re-import as text, or strip quotes with SUBSTITUTE |
| Chart shows one flat blob per day | Line chart date axis uses day units | Use Scatter with Straight Lines |
Quick Diagnosis
Run through these in order. They tell you which issue below applies.
- Check the file extension.
.blgmeans you needrelog.exefirst..csvmeans you can skip ahead. - Click a timestamp cell and look at the alignment. Left-aligned usually means text. Right-aligned means Excel already made it a number, and it may be wrong.
- Find a row where the day is 13 or higher. If
05/13/2022stays text while05/06/2022became a date, Excel is reading day-first. Your data is month-first. - Type
=ISNUMBER(A2)in an empty cell.FALSEmeans text, so use a formula.TRUEonly means Excel stored a number, not that it parsed the date correctly. A swapped date is still a number, so check a day-13+ row before you trust it, and re-import rather than reformat if it’s wrong.
Why PerfMon CSV Timestamps Show Up as Text in Excel
PerfMon typically writes the timestamp as a quoted text string, such as “05/06/2022 07:45:03.341”
, rather than a native date value. The exact layout can vary somewhat by PerfMon version and log settings, so always check your file’s first data row before trusting any formula.
Either way, Excel has to guess what that text means. It uses your computer’s regional settings for that guess, and ignores the log’s format (Super User thread).
That guess goes one of two ways. If your workstation is day-first (UK, EU, Australia), 05/06/2022 becomes June 5. Meanwhile 05/13/2022 stays text because month 13 doesn’t exist. If the guess fails entirely, the whole column stays text. Either way, sorting and charting break.
The first column header can also give a clue. In typical relog CSV exports it reads something like (PDH-CSV 4.0) (Pacific Standard Time)(480), naming the CSV format and the capture machine’s time zone. Inspect your own header, since the exact text depends on the log format and how it was collected.
Common Issues and Solutions
Problem: The Log Is a .blg File, Not a CSV
Symptoms:
- Data Collector Set output in
C:\PerfLogs\ends in.blg - Excel shows garbage characters or refuses the file
Why it happens: PerfMon Data Collector Sets write binary .blg logs by default. Excel can’t read the binary format.
Fix: Convert it with relog.exe. You don’t need to re-run the collector (Microsoft Learn: binary to CSV).

Open an elevated Command Prompt and change to the log folder:
cd /d C:\PerfLogs\Admin\MyCollector
rem /d also switches drive letter if needed
relog OriginalLog.blg -f CSV -o NewLog.csv
rem -f CSV sets output format; without it relog writes binary
rem -o names the output file
Example output looks like this. Your paths and times will differ, and the sample count depends on your capture’s duration and interval:
Input
----------------
File(s):
OriginalLog.blg (Binary)
Begin: 5/6/2022 7:45:03
End: 5/6/2022 9:45:03
Samples: 7201
Output
----------------
File: NewLog.csv
The command completed successfully.

Verify: Open NewLog.csv in Notepad. The first line should be a header row. Each data row should start with a timestamp, usually wrapped in quotes.
Tip: Run
relog /?to see the filtering options. The archived Microsoft guide covers trimming a log down to specific counters. A smaller CSV is much easier to work with in Excel.
Problem: Timestamp Column Is Text and Won’t Sort
Symptoms:
- Timestamps are left-aligned
- Sorting puts all January rows after all December rows for different years
=ISNUMBER(A2)returnsFALSE
Why it happens: Excel kept the string as text because it didn’t match your regional date pattern.
Fix (seconds precision): Insert a helper column B next to the timestamps and enter:
=DATEVALUE(LEFT(A2,10))+TIMEVALUE(MID(A2,12,8))
Here’s how the formula reads the example 05/06/2022 07:45:03.341:
| Part | Extracts | Result |
|---|---|---|
LEFT(A2,10) | 05/06/2022 | date text |
MID(A2,12,8) | 07:45:03 | time text (skips the space at position 11) |
| Sum | 44687.32295 (May 6, 2022 07:45:03) |
There’s a catch. DATEVALUE reads the date using your locale. On a day-first machine it returns June 5. If you’re not on a month-first locale, use the DATE() version in the milliseconds section below. It builds the date from fixed character positions and ignores locale.

Double-click the fill handle to copy the formula down. Then copy column B and use Paste Special > Values to freeze the results.
Verify: =ISNUMBER(B2) returns TRUE, sorting column B puts rows in time order, and a day-13+ row shows the month that matches the source text.
Problem: Day and Month Are Swapped
Symptoms:
- May 6 displays as June 5
- Dates with a day of 13 or higher stay as text
- Charts show gaps and jumps across months
Why it happens: Excel parsed 05/06/2022 with your day-first regional setting. Once it’s parsed, the stored number is June 5. No amount of cell formatting turns it back into May 6.
Fix: Re-import the file. Don’t reformat. The cleanest path is Power Query with an explicit locale:
- Open a blank workbook. Go to Data > From Text/CSV, pick the CSV, and click Transform Data.
- In Applied Steps, delete the automatic Changed Type step. That step is where the bad guess happens.
- Select the timestamp column. Go to Transform > Data Type > Using Locale… (or right-click > Change Type > Using Locale…).
- Set Data Type to Date/Time and Locale to English (United States), then click OK.
- Click Home > Close & Load.


The locale you pick describes the source file. Results still show in your own regional format.
Verify: Find a row with a day of 13 or higher. It should now be a proper date, with the month matching the source text.
Problem: Milliseconds Disappear
Symptoms:
- Converted times show
07:45:03with no fraction - Samples inside the same second look identical
Why it happens: The seconds-only formula drops the .fff part on purpose. Default date-time formats also hide fractions even when they’re stored.
Fix: Use the locale-independent, millisecond-preserving formula below. It’s built against the exact unquoted 23-character layout 05/06/2022 07:45:03.341.
If your field has a trailing quote, extra whitespace, or a different number of fractional digits, adjust it first using the LEN() check described below.
=DATE(MID(A2,7,4),LEFT(A2,2),MID(A2,4,2))+TIMEVALUE(MID(A2,12,8))+VALUE(RIGHT(A2,3))/86400000
MID(A2,7,4) is the year, LEFT(A2,2) is the month, and MID(A2,4,2) is the day. RIGHT(A2,3) grabs 341 only when the field is exactly 23 characters, unquoted, with three fractional digits. Dividing by 86,400,000 (milliseconds per day) turns that into a day fraction; for the example string, the result is about 44687.322955.
If your source really is day-first (DD/MM/YYYY), swap the month and day arguments:
=DATE(MID(A2,7,4),MID(A2,4,2),LEFT(A2,2))+TIMEVALUE(MID(A2,12,8))+VALUE(RIGHT(A2,3))/86400000
If the field still has quotes, or your export uses more or fewer than three fractional digits, extract the fraction by locating the decimal point instead of counting characters from the right:
=LET(clean,SUBSTITUTE(A2,"""",""),frac,MID(clean,FIND(".",clean)+1,9),
DATE(MID(clean,7,4),LEFT(clean,2),MID(clean,4,2))+TIMEVALUE(MID(clean,12,8))+VALUE(frac)/10^LEN(frac)/86400)
This strips any quote marks first, then reads however many digits actually follow the decimal point rather than assuming three. For a whole column at once, Power Query’s Replace Values step can strip quotes before the Using Locale date conversion covered earlier.
Next, press Ctrl+1 and choose Number > Custom. In Type, enter:
yyyy-mm-dd hh:mm:ss.000

Verify: B2 displays 2022-05-06 07:45:03.341.
Problem: Text to Columns Gives Odd Results
Symptoms:
- You’d rather not use formulas, and you want an in-place conversion
- The first attempt still swapped day and month
Why it happens: The wizard defaults to General, which applies your locale. You have to tell it the source order.
Setting the time column to General doesn’t guarantee Excel converts the fractional-seconds text to a number. Depending on your Excel build and regional settings, the time can stay as text or lose the milliseconds entirely.
Fix: This method is less predictable than the formula or Power Query approaches above, so treat it as a quick one-off rather than something to repeat on every log.
- Insert one empty column to the right of the timestamps. The split needs room.
- Select the timestamp column and go to Data > Text to Columns.
- Choose Delimited, then check Space only.
- In the last step, select the date column and set Column data format to Date: MDY. Leave the time column as General.
- In a new column, parse the time text explicitly instead of relying on
=A2+B2, which can fail or silently drop the fraction if B2 never converted to a number:
=A2+TIMEVALUE(LEFT(B2,8))+VALUE(RIGHT(B2,3))/86400000
This reads the hours, minutes, seconds, and fractional milliseconds from the text in B2 directly, so it works whether or not Excel auto-converted B2 to a number. Apply the custom format yyyy-mm-dd hh:mm:ss.000 from the milliseconds section above.
Verify: Check a day-13+ row and confirm the milliseconds survived. If =ISNUMBER(B2) returns FALSE after the split, this formula still works because it reads B2 as text. If results still look wrong, use the DATE() formula method or Power Query instead.
Problem: Cells Show ##### or #VALUE!
Symptoms:
- Converted column is full of
##### - The formula returns
#VALUE!
Why it happens: ##### means the column is too narrow, or the value is a negative date. #VALUE! usually means the cell holds something other than the text you expect. Excel may have already turned it into a number. The text may also still have quote characters or a different layout.
Fix:
- Widen the column (double-click the column border).
- Run
=LEN(A2). An unquotedMM/DD/YYYY HH:MM:SS.ffftimestamp returns23. Excel’s CSV import normally strips the quotes, so a different length means something else is attached or the layout differs. A result of25often means literal quotes survived, so wrap the reference inSUBSTITUTE(A2,"""",""). Other lengths point to a different format, so look at the raw text before adjusting the formula. - If
=ISNUMBER(A2)isTRUE, the string functions are slicing a serial number. Re-import through Power Query and set the column to Text before converting.
Verify: The formula returns a number near 44687 for May 2022 dates. For reference, 2023 through 2025 logs fall between 44927 (January 1, 2023) and 46022 (December 31, 2025).
Problem: Large Logs Are Slow or Truncated
Symptoms:
- Filling formulas down hundreds of thousands of rows locks up Excel
- Excel warns that the file didn’t load completely
Why it happens: A worksheet holds 1,048,576 rows. A 1-second sample interval over 12+ days, or many counters, gets close to that limit fast.
Fix: Use the Power Query Using Locale method above. It converts in one pass and doesn’t need a formula per row. Trim the log with relog first if it’s still too big. The trade-off is that Power Query adds a refresh step and a query you’ll need to manage.
Verify: The row count in the loaded table matches the Samples: line from relog.
Problem: Chart Collapses Samples Into One Point per Day
Symptoms:
- A full day of CPU samples shows as one vertical bar
- The time axis only shows dates
Why it happens: When Excel treats the timestamps as a date axis, a Line chart usually picks days as the base unit, so intra-day samples land on the same tick. You can change the axis type or base unit, but a scatter chart avoids the problem.
Fix: Select the converted timestamp column plus a counter column (for example % Processor Time). Then choose Insert > Scatter > Scatter with Straight Lines. Scatter charts plot true numeric time. Set the horizontal axis number format to hh:mm (MSSQLTips walkthrough).

Verify: Hover over a point. It should show the exact time as well as the date. If the CPU graph points to a tuning problem, our Windows Server 2025 performance tuning guide covers what to change next.
Error Messages Quick Reference
| Error / Indicator | Where | Meaning | Fix |
|---|---|---|---|
#VALUE! | Excel formula | Input isn’t the expected text, or DATEVALUE can’t read it in your locale | Use the DATE() variant, and check LEN and ISNUMBER |
##### | Excel cell | Column too narrow or negative date | Widen the column, then validate the source |
| Green triangle “Number Stored as Text” | Excel cell | Value is text | Convert with a formula or Power Query |
DataFormat.Error: We couldn't parse the input provided as a DateTime value. | Power Query | Locale doesn’t match the source order | Using Locale > English (United States) |
| Garbled characters on open | Excel | You opened a .blg | relog ... -f CSV |
Platform-Specific Fixes
On Windows
Formula separator is a semicolon
Some European Excel installs use ; as the argument separator. Pasting the formulas above then fails right away. Replace each , between arguments with ;. Windows takes this from Control Panel > Region > Additional settings > List separator.
Import-Counter: skip Excel entirely
Import-Counter reads .blg or .csv logs into objects with a real DateTime Timestamp property. That means no text parsing at all. Microsoft documents the cmdlet for Windows PowerShell 5.1, so run it in powershell.exe. If you work in PowerShell 7, run Get-Command Import-Counter first to see whether it’s available in your session.
The example below reads only the first counter in each sample set (CounterSamples[0]). For a multi-counter log, change the index or filter on Path. The Timestamp values are as precise as the source log’s sample times.
# Read the log; each sample set has a DateTime Timestamp
$data = Import-Counter -Path "C:\PerfLogs\Admin\MyCollector\OriginalLog.blg"
$data | Select-Object -First 3 Timestamp, @{Name='Value';Expression={$_.CounterSamples[0].CookedValue}}
Example output (your values will differ):
Timestamp Value
--------- -----
5/6/2022 7:45:03 AM 12.4
5/6/2022 7:45:04 AM 9.8
5/6/2022 7:45:05 AM 15.1

To hand Excel an unambiguous file, write the timestamps in ISO format:
$data | Select-Object @{Name='Timestamp';Expression={$_.Timestamp.ToString('yyyy-MM-dd HH:mm:ss.fff')}}, @{Name='Value';Expression={$_.CounterSamples[0].CookedValue}} |
Export-Csv -Path "C:\PerfLogs\Admin\iso-export.csv" -NoTypeInformation
# -NoTypeInformation drops the #TYPE header line Windows PowerShell adds
Again, this exports one counter. Microsoft’s Export-Counter walkthrough covers the reverse direction.
On macOS
Getting the CSV onto the Mac
Do the relog or Import-Counter step on Windows, then copy the CSV to the Mac.

Menu path differences
Data > From Text/CSV and Data > Text to Columns use the same names on Excel for Mac. Format Cells is Cmd+1. If your build’s Power Query editor doesn’t show Using Locale, use the DATE() formula. It doesn’t depend on locale.

Dates are off by four years
A workbook that uses the 1904 date system shifts pasted serial numbers by 1,462 days. Check Excel > Preferences > Calculation > Use 1904 date system. Make sure it matches the workbook you’re pasting into.
Configuration Issues
| Mistake | Correct Approach |
|---|---|
| Applying a date format to text cells | Convert with a formula or Power Query first, then format |
| Leaving Power Query’s automatic Changed Type step in place | Delete it, then use Using Locale |
| Picking your own locale in Using Locale | Pick the source locale: English (United States) for month-first |
Relying on DATEVALUE on a day-first PC | Use DATE(MID(A2,7,4),LEFT(A2,2),MID(A2,4,2)) |
| Double-clicking the CSV to open it | Use Data > From Text/CSV to confirm the delimiter and types |
| Leaving formulas live on 500k rows | Paste as values once the conversion checks out |
Getting Help
- Collector logs: Default output lives under
C:\PerfLogs\. The Data Collector Set properties in Performance Monitor show the exact path. - Debug info to collect: the first two lines of the CSV (header plus one row),
=LEN(A2),=ISNUMBER(A2), your Windows region format, and your Excel version (File > Account > About Excel on Windows, Excel > About Excel on Mac). - Docs: Microsoft Learn on binary to CSV logs and the archived relog guide.
- Community: the Super User day/month thread matches the locale symptom closely.
If you analyze logs often, Microsoft’s archived guidance also points to Performance Analysis of Logs (PAL). It does threshold analysis automatically. The trade-off is less control than a spreadsheet.
Prevention Tips
- Save the Power Query once: Point it at a fixed path like
C:\PerfLogs\Exports\latest.csv, then use Data > Refresh All for each new log. - Export ISO timestamps:
yyyy-MM-dd HH:mm:ss.ffffrom PowerShell can’t be read as either day-first or month-first by mistake. - Note the capture time zone: The CSV header records it. Otherwise, matching against event logs from another zone will be off by hours.
- Archive the
.blgalongside the CSV: Binary logs are smaller and can be re-converted with different counter filters. A NAS share or external SSD works well for long-term storage.
Frequently Asked Questions
Why does my PerfMon CSV timestamp show up as text instead of a date?
PerfMon usually writes it as a quoted text string, and Excel parses it using your regional settings. If those don’t match month-first order, the value stays text. The same happens if the fractional seconds don’t fit the pattern Excel expects.
What’s the exact relog.exe command to convert a .blg log to CSV?
relog OriginalLog.blg -f CSV -o NewLog.csv from an elevated Command Prompt in the log’s folder.
What Excel formula converts a PerfMon timestamp into a real date/time?
=DATEVALUE(LEFT(A2,10))+TIMEVALUE(MID(A2,12,8)) on month-first systems. For any locale, use =DATE(MID(A2,7,4),LEFT(A2,2),MID(A2,4,2))+TIMEVALUE(MID(A2,12,8)). Both assume the exact unquoted layout described earlier; strip quotes first if your export includes them.
How do I keep milliseconds?
Add +VALUE(RIGHT(A2,3))/86400000 to the DATE() formula, then apply the custom format yyyy-mm-dd hh:mm:ss.000. If the field is quoted or has a different number of fractional digits, use the decimal-point-based formula in the milliseconds section instead.
How do I stop Excel swapping day and month?
Import with Power Query and use Using Locale with English (United States). Reformatting an already-swapped cell won’t fix it.
Can I chart counters over time after the fix?
Yes. Use Scatter with Straight Lines for intra-day data, since a Line chart on a date axis usually groups samples by day.
Can I analyze PerfMon data without Excel?
Yes. Import-Counter in Windows PowerShell returns native DateTime timestamps you can filter and sort directly.
Wrapping Up
The DATE() formula is the one I’d reach for by default, because it ignores locale. For anything you’ll repeat weekly, Power Query or Import-Counter is less fragile than hand-filled formulas.
| Step | Action | Applies To |
|---|---|---|
| 1 | relog OriginalLog.blg -f CSV -o NewLog.csv | Windows |
| 2 | DATE() + TIMEVALUE() + ms formula, or Power Query Using Locale | Windows, macOS |
| 3 | Custom format yyyy-mm-dd hh:mm:ss.000 | Windows, macOS |
| 4 | Scatter with Straight Lines chart | Windows, macOS |
| 5 | Import-Counter with ISO export | Windows |
One maintenance tip: save the relog and Import-Counter lines as a .ps1 next to your collector output. Run it from Task Scheduler after each collection. If the output ever looks wrong, the original .blg is still there to re-convert.
Last updated: November 28, 2026 | Applies to PerfMon, relog.exe, and Windows PowerShell on Windows; Excel for Microsoft 365 on Windows and macOS