Date Format
Grep Badger's UI is built with Angular, so the custom date format uses Angular date formatting. The default value is M/d/yy, h:mm a.
This means the value you enter follows Angular's DatePipe format rules, which are based on Unicode date field patterns.
This is not a .NET
DateTimeformat string reference. Some patterns look similar, but not all .NET tokens work the same way here.
Default format
The default timestamp format is:
HH:mm:ss
Example output:
14:07:32
Common examples
| What you want | Format | Example output |
|---|---|---|
| 24-hour time | HH:mm:ss | 14:07:32 |
| 12-hour time with AM/PM | hh:mm:ss a | 02:07:32 PM |
| Date only | MMM d, yyyy | Apr 19, 2026 |
| Short date | M/d/yy | 4/19/26 |
| Date and time | yyyy-MM-dd HH:mm:ss | 2026-04-19 14:07:32 |
| Date and time with milliseconds | yyyy-MM-dd HH:mm:ss.SSS | 2026-04-19 14:07:32.123 |
| Full month name | MMMM d, yyyy | April 19, 2026 |
| Weekday included | EEE, MMM d, yyyy HH:mm | Sun, Apr 19, 2026 14:07 |
| Built-in short format | short | 4/19/26, 2:07 PM |
| Built-in medium format | medium | Apr 19, 2026, 2:07:32 PM |
Pattern reference
The table below covers the most useful Angular date format tokens.
| Field | Format | Description | Example |
|---|---|---|---|
| Era | G, GG, GGG | Abbreviated era | AD |
GGGG | Wide era | Anno Domini | |
GGGGG | Narrow era | A | |
| Year | y | Numeric year, minimum digits | 2026 |
yy | 2-digit year | 26 | |
yyy | 3-digit year | 2026 | |
yyyy | 4-digit year | 2026 | |
| Month | M | Numeric month | 4 |
MM | 2-digit month | 04 | |
MMM | Abbreviated month name | Apr | |
MMMM | Wide month name | April | |
MMMMM | Narrow month name | A | |
| Day of month | d | Numeric day | 9 |
dd | 2-digit day | 09 | |
| Weekday | E, EE, EEE | Abbreviated weekday | Sun |
EEEE | Wide weekday | Sunday | |
EEEEE | Narrow weekday | S | |
EEEEEE | Short weekday | Su | |
| AM/PM | a, aa, aaa | AM/PM marker | PM |
aaaa | Wide AM/PM marker | p.m. | |
aaaaa | Narrow AM/PM marker | p | |
| Hour (1-12) | h | Numeric hour, 1-12 | 2 |
hh | 2-digit hour, 1-12 | 02 | |
| Hour (0-23) | H | Numeric hour, 0-23 | 14 |
HH | 2-digit hour, 0-23 | 14 | |
| Minute | m | Numeric minute | 7 |
mm | 2-digit minute | 07 | |
| Second | s | Numeric second | 3 |
ss | 2-digit second | 03 | |
| Fractional seconds | S | Tenths of a second | 1 |
SS | Hundredths of a second | 12 | |
SSS | Milliseconds | 123 | |
| Time zone | z, zz, zzz | Short specific non-location format | GMT-4 |
zzzz | Long specific non-location format | GMT-04:00 | |
Z, ZZ, ZZZ | ISO8601 basic format | -0400 | |
ZZZZZ | ISO8601 extended format | -04:00 | |
O, OO, OOO | Short localized GMT format | GMT-4 | |
OOOO | Long localized GMT format | GMT-04:00 |
Predefined format names
Angular also supports a few built-in format names.
| Format name | Example output |
|---|---|
shortDate | 4/19/26 |
mediumDate | Apr 19, 2026 |
longDate | April 19, 2026 |
fullDate | Sunday, April 19, 2026 |
shortTime | 2:07 PM |
mediumTime | 2:07:32 PM |
longTime | 2:07:32 PM GMT-4 |
fullTime | 2:07:32 PM GMT-04:00 |
short | 4/19/26, 2:07 PM |
medium | Apr 19, 2026, 2:07:32 PM |
long | April 19, 2026 at 2:07:32 PM GMT-4 |
full | Sunday, April 19, 2026 at 2:07:32 PM GMT-04:00 |
Literal text
Use single quotes to include plain text in the result.
Example:
- Format:
'Time:' HH:mm:ss - Output:
Time: 14:07:32
Another example:
- Format:
MMM d, yyyy 'at' HH:mm - Output:
Apr 19, 2026 at 14:07
Tips
- If you want a simple log timestamp, use
HH:mm:ss - If you want milliseconds, add
.SSS - If you want AM/PM, use
a - If you want month names, use
MMMorMMMM - If a format does not behave as expected, make sure you are using Angular date tokens rather than .NET date tokens
Quick copy/paste formats
HH:mm:ss
HH:mm:ss.SSS
hh:mm:ss a
MMM d, yyyy
MMM d, yyyy HH:mm:ss
yyyy-MM-dd HH:mm:ss
yyyy-MM-dd HH:mm:ss.SSS
EEE, MMM d, yyyy HH:mm