Date and time conversion functions for MappingsDecember 7, 2021

Mappings now has a $convertDateTime function which makes date formatting and parsing easier (see examples below). On top of that, Mappings now also provides $dateTime const with common date formats. See the documentation here

$convertDateTime("20140919", "yyyyMMdd",  "yyyy-MM-dd") → "2014-09-19"
$convertDateTime("2021-01-02T12:00:00Z", $dateTime.RFC3339,  "yyyy-MM-dd") → "2021-01-02"
$convertDateTime("2021-01-02T12:00:00+00:00", $dateTime.RFC3339,  "yyyy-MM-dd") → "2021-01-02"
$convertDateTime("210102", $dateTime.EDIDate, $dateTime.RFC3339) → "2021-01-02T12:00:00Z"
$convertDateTime("12:00 2nd January 2021", "hh:mm do MMMM yyyy",  "yyyy-MM-dd") → "2021-01-02"

Build EDI integrations fast, without being an EDI expert

Start building
How Stedi worksCustomersPricingDocumentationChangelog
  1. Twitter
  2. GitHub
Backed by
AdditionBloomberg BetaFirst RoundStripeUSV
Customer AgreementService TermsPrivacy Notice

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on our site are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.