Forum Discussion
nove718
1 year agoNew Member
Transform Text Column into Date Column
Hello, I've searched the forum and reviewed other examples of this issue but I'm not sure if the timestamp down to the microseconds is giving me a unique issue that may require an altered solution? ...
- 1 year ago
Hi nove718 ,
I tried reproducing your scenario using sample data, and I was able to achieve the desired output successfully. I've attached a .pbix file for your reference please take a look and review the details.
I created a custom column in Power Query using the following M code to convert your Create date values into proper DateTime format.
let rawText = [CREATE_DATE], formattedText = Text.Start(rawText, 10) & " " & Text.Middle(rawText, 11, 2) & ":" & Text.Middle(rawText, 14, 2) & ":" & Text.Middle(rawText, 17, 2) & "." & Text.Middle(rawText, 20, 3) in try DateTime.FromText(formattedText) otherwise nullFYI:
ā Yugandhar
Community Support Team.
V-yubandi-msft
1 year agoCommunity Support
Hi nove718 ,
Does the solution provided address your issue, or are you still experiencing the problem? Your feedback is important to the community. If your issue has been resolved, please mark the response as Accepted Solution to help others find it more easily.
Thank you.