Skip to main content

Date Format Converter

Translate a date format pattern between strftime, moment.js, date-fns, Java, .NET and Go, or format a date with a pattern. Free and private.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to Unix Timestamp Converter.

Free Date Format Converter

Every language writes date formats differently. Paste a pattern from one and get the same pattern for another, or try a pattern on a real date. It gives developers a quick browser-based way to solve a focused date format converter task before moving the result into a project.

How to use Date Format Converter

Choose "Translate a pattern" or "Format a date". Tokens with no equivalent are marked so you can see them.

Common mistakes

  • Using YYYY in date-fns or Java: the year is yyyy there (YYYY is the week-based year).
  • Mixing up MM (month) and mm (minute).

Frequently asked questions

Which pattern styles are covered?
strftime (C, Python, Ruby, PHP date functions differ slightly), moment.js and day.js, date-fns and Java's DateTimeFormatter (Unicode patterns), .NET custom formats and Go reference layouts.
What does [unsupported: %j] mean?
That token has no matching token in the target style. It is kept in the text so you can decide what to do.
Why is mm both minute and month?
In moment.js, MM is the month and mm is the minute. In strftime, %m is the month and %M the minute. Case matters.
Is anything uploaded?
No. The calculation runs in your browser and nothing you enter is sent to a server.
How do I use this date format converter tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More Data Generation & Utilities

View all Data Generation & Utilities tools →