Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 4 | |
| 2 |