top of page

Power Query: Convert Date Format (Universal Format)

Updated: May 28

Function: Converts different date formats into YYYY-MM-DD or any other format that you define. You define it in code, it executes!


Spreadsheet interface showing data conversion functions, with highlighted sections: "Invoke Custom Function" and "ConvertDate" table displaying dates.
Date column with mixed date formats

Usage:

 = ConvertToISODate("03/13/2025") → Returns: "2025-03-13"

Power Query code to use and reuse:

let
  ConvertToISODate = (inputDate as any) as nullable text =>
    let
      ConvertedDate = try Date.ToText(Date.From(inputDate), "yyyy-MM-dd") otherwise null
    in
      ConvertedDate

Data table with columns: Data, Date, and fx_ConvertDate. Entries show formatted dates. Green and grey highlights surrounding columns.
Perfectly cleaned date format in new column


Need a code and instructions? Free of charge =)




Comentarios

Obtuvo 0 de 5 estrellas.
Aún no hay calificaciones

Agrega una calificación

© 2025 Excelized. All rights reserved.

bottom of page