How to Format DateTime in Elm

This took me a bit to figure out.

Assuming we’re using rluiten/elm-date-extra package

Get your import:
import Date.Config.Config_en_us exposing (config)

Get the DateTime string:
format config “%m/%d/%Y” yourDateTime

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.