Forum Discussion
topazz11
Helper III
1 year agodate time format
Could anyone help to convert this date format in Power Query? 2025-01-22T09:42:02.541-06:00[America/Chicago] -> 1/22/2025 9:42:02 AM Thanks,
- 1 year ago
Here's the function you can re-use in Power Query.
Create a blank query and paste below M in it.
(DateText as text) as datetime => let CleanText = Text.BeforeDelimiter(DateText, "["), Parsed = DateTimeZone.FromText(CleanText), Result = DateTimeZone.RemoveZone(Parsed) in ResultYou will have
When you Add a Custom Column invoke this Function
It will return results as in below picture.
MasonMA
Super User
1 year ago
Here's the function you can re-use in Power Query.
Create a blank query and paste below M in it.
(DateText as text) as datetime =>
let
CleanText = Text.BeforeDelimiter(DateText, "["),
Parsed = DateTimeZone.FromText(CleanText),
Result = DateTimeZone.RemoveZone(Parsed)
in
Result
You will have
When you Add a Custom Column invoke this Function
It will return results as in below picture.
- topazz111 year ago
Helper III
it is harder than I thought.
Thank you for your help.