(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Microsoft Log Parser timestamp formats

The following article covers the timestamp format specifiers accepted by Microsoft Log Parser.

Date

  • Year
    • y, yy, yyy, yyyy = last 1, 2, 3, or 4 digits, relative to 2000
  • Month
    • M = no leading zero
    • MM = leading zero
    • MP = leading space
    • MX = no leading zero, or with or without zero when parsing
    • MMM = 3-character abbreviation
    • MMMM = full name of month
  • Day
    • d = no leading zero
    • dd = leading zero
    • dp = leading space
    • dx = no leading zero, or with or without zero when parsing
    • ddd = 3-character abbreviation
    • dddd = full name of day

Time

  • Hour
    • h or H = no leading zero
    • hh or HH = leading zero
    • hp or HP = leading space
    • hx or HX = leading zero, or with or without leading zero when parsing
  • Minute
    • m = no leading zero
    • mm = leading zero
    • mp = leading space
    • mx = leading zero, or with or without leading zero when parsing
  • Second
    • s = no leading zero
    • ss = leading zero
    • sp = leading space
    • sx = leading zero, or with or without leading zero when parsing
  • Millisecond
    • l = no leading zero
    • ll = leading zero
    • lp = leading space
    • lx = leading zero, or with or without leading zero when parsing
  • Nanosecond
    • n = no leading zero
    • nn = leading zero
    • np = leading space
    • nx = leading zero, or with or without leading zero when parsing
  • Other
    • tt = AM/PM
    • ? = space, or any character (wildcard) when parsing
    • any other character, not listed above, is listed verbatim 

For more about Log Parser, visit LogParserPlus.com.

blog comments powered by Disqus

Archives