Start a project

Tool 359 of 425 · Dates

Date Format String Converter

Converts a date format pattern into six other syntaxes and previews it on a sample date.

Date Format String Converter

Your input

Result

SystemPattern

    01

    What it does

    Converts a date format pattern into six other syntaxes and previews it on a sample date.

    • strftime (Python, C, Ruby)
    • Unicode (date-fns, Java, Swift)
    • Moment, PHP, Go and PostgreSQL
    • Live sample output

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    Equivalent patterns per language, with a Copy and a Download button on every result.

    • strftime
    • Date format
    • date-fns

    Why it matters

    %d/%m/%Y, dd/MM/yyyy, DD/MM/YYYY, d/m/Y and 02/01/2006 all mean the same date, and mixing them up gives wrong dates.

    Write the pattern once and copy it for each language.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Convert. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    Why is Go's format 2006-01-02?

    Go uses a reference time, Mon Jan 2 15:04:05 2006, instead of codes.

    YYYY vs yyyy?

    In Unicode patterns YYYY is the week-year and can be wrong around New Year. Use yyyy.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk