Power Query: Convert Date Format (Universal Format)

Mar 16, 2025
1 min read
Updated: Oct 3
PRACTICE MATERIAL BELOW!👇
Function: Converts different date formats into YYYY-MM-DD or any other format that you define. You define it in code, it executes!

Usage:
= ConvertToISODate("03/13/2025") → Returns: "2025-03-13"let
ConvertToISODate = (inputDate as any) as nullable text =>
let
ConvertedDate = try Date.ToText(Date.From(inputDate), "yyyy-MM-dd") otherwise null
in
ConvertedDate
in
ConvertToISODate

Need a code and instructions? Free of charge =)
Reuse your Power Query work
Build a broader data cleaning reference with reusable Power Query transformation patterns for Excel and Power BI.
Need help adapting this to your data? Discuss your project.





Comments