Strftime Format Tester

Type a date and time and a strftime format string to see how each % code is rendered. Times are read and shown in UTC so the result is the same on every computer.

1 Fill in the boxes

2 Your answer

Your answer shows here as you type.

How to use the Strftime Format Tester

  1. Enter a date and time in ISO form, such as 2026-11-28T09:05:03. Without a time zone it is read as UTC.
  2. Type a format string using % codes, such as %Y for the year or %H:%M for hours and minutes.
  3. Read the Result row to see the rendered text, and check the list of unknown codes if one appears.

Frequently asked questions

What does strftime mean?

strftime is a standard C library function that formats a date and time as text. Each % code in the format string is replaced by a part of the date, such as %Y for the four-digit year.

What is the difference between %Y and %y, or %d and %e?

%Y is the four-digit year (2026) and %y is the last two digits (26). %d is the day of the month padded with a zero (05), while %e pads it with a space ( 5).

How do %U, %W and %V differ?

%U numbers weeks from the first Sunday of the year, %W numbers them from the first Monday, and %V is the ISO 8601 week number, where weeks start on Monday and week 1 has the year's first Thursday.

Do strftime codes work the same in every language?

The core codes such as %Y, %m, %d, %H, %M and %S are shared by C, Python, PHP and most other languages. Extensions like %f for microseconds or %-d for unpadded numbers differ between libraries.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.