Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am getting the date from the source in below format, i want date & time should be in MM/DD/YYYY HH:MM:SS AM/PM.
20140706 17:23 |
How do i change in Power Query.
Thanks,
Smartnag
You'll need to use the DateTime.ToText function.
Function documentation- https://learn.microsoft.com/en-us/powerquery-m/datetime-totext
Format specifiers- https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
Example that should work for you depending on current culture (if this doesn't work, add a specified format [Format="x", Culture="y"])-
Usage
DateTime.ToText(#datetime(2010, 12, 31, 01, 30, 25))
Output
"12/31/2010 1:30:25 AM"
Thanks for the reply, i tried in both the ways.
got the below errors.
And the date time is coming from the source is text format.
20160821 09:15 |
Thanks,
Smartnag
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.