Time-Specific Format Codes
- Updated2026-09-28
- 2 minute(s) read
LabVIEW includes time-specific format codes that define how to format an output string from input data that includes time information.
Use these format codes in the following places:
- Within the <Embedded Time
Format> syntax element of format
string inputs to formatting functions. Embedded Time
Format supports different format codes depending on which time
conversion code that you use: absolute time (T) or relative
time (t).
To create a valid Embedded Time Format element for formatting functions, surround time-specific format codes with < and >.
- The time format string input to the Format
Date/Time String function.
For the time format string input to Format Date/Time String, you do not need to surround time format codes with < and >.
| Format Code | Embedded Time Format Compatibility: Absolute Time (T) or Relative Time (t) | Value |
|---|---|---|
| %a | Absolute time | Abbreviated weekday name (for example, Wed) |
| %A | Absolute time | Full weekday name (for example, Wednesday) |
| %b | Absolute time | Abbreviated month name (for example, Jun) |
| %B | Absolute time | Full month name (for example, June) |
| %c | Absolute time | Locale-specific default date and time |
| %d |
|
Day of month (01–31) |
| %H |
|
Hour (24-hour clock) (00–23) |
| %I | Absolute time | Hour (12-hour clock) (01–12) |
| %j | Absolute time | Day number of the year (001–366) |
| %m | Absolute time | Month number (01–12) |
| %M |
|
Minute (00–59) |
| %p | Absolute time | AM or PM flag |
| %S |
|
Second (00–59) |
| %digitu |
|
Fractional seconds with digit precision, where digit is a number. This code accounts for the decimal point in strings that include fractional seconds. When you use this code, you do not need to add a literal period to the time format string. |
| %U | Absolute time | Week number of the year (00–53), with the first Sunday as the first day of week one; 00 represents the first week |
| %w | Absolute time | Weekday as a decimal number (0–6), with 0 representing Sunday |
| %W |
|
Week number of the year (00–53), with the first Monday as the first day of week one; 00 represents the first week |
| %x | Absolute time | Locale-specific date |
| %.1x | Absolute time | Long date format |
| %.2x | Absolute time | Abbreviated long date format |
| %X | Absolute time | Locale-specific time |
| %y | Absolute time | Year within century (00–99); when you scan the numbers, numbers (00–68) represent years in the twenty-first century (2000–2068) and numbers (69–99) represent years in the twentieth century (1969–1999) |
| %Y | Absolute time | Year, including the century (for example, 1997) |
| %z | Absolute time | Difference between locale time and universal time (HH:MM:SS) |
| %Z | Absolute time | Time zone name or abbreviation, depending on the operating system locale settings |