Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
how to convert the date/time columns in text data type to data and time columns seperately
| 10-10-2017 21:25 |
Solved! Go to Solution.
PQ should recognise such a text and be able to set the data type to Date/Time.
Then, on the Add Column Ribbon and choose Date, Date Only in the From Date & Time group. Repeat that step for the time portion (Time, Time Only).
Hi @Prasanthke , Just replace your source query and DateTimeColumn in the below M Code
let
Source = YourTable,
DateColumn = Table.AddColumn(Source, "Date", each Date.From(Text.From([DateTimeColumn]))),
TimeColumn = Table.AddColumn(DateColumn, "Time", each Time.From(Text.From([DateTimeColumn])))
in
TimeColumn
Thanks,
Proud to be a Super User! | |
Hi @Prasanthke ,
Thank you for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank @Jai-Rathinavel and @Riny_vE for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
please gothorugh the below official Documentation hope this resolve your Issue.
https://learn.microsoft.com/en-us/powerquery-m/date-fromtext?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it
Best Regards,
Harshitha.
Community Support Team
USe the following code
let
Source = YourTable,
ChangedType = Table.TransformColumnTypes(Source, {{"DateTimeText", type datetime}}),
AddDate = Table.AddColumn(ChangedType, "DateOnly", each DateTime.Date([DateTimeText]), type date),
AddTime = Table.AddColumn(AddDate, "TimeOnly", each DateTime.Time([DateTimeText]), type time)
in
AddTime
Hi @Prasanthke ,
Thank you for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank @Jai-Rathinavel and @Riny_vE for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
please gothorugh the below official Documentation hope this resolve your Issue.
https://learn.microsoft.com/en-us/powerquery-m/date-fromtext?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it
Best Regards,
Harshitha.
Community Support Team
Hi @Prasanthke,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You.
Harshitha.
Community Support Team.
Hi @Prasanthke,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank You.
Harshitha.
Community Support Team.
Hi @Prasanthke,
May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank You.
Harshitha.
Community Support Team.
Hi @Prasanthke , Just replace your source query and DateTimeColumn in the below M Code
let
Source = YourTable,
DateColumn = Table.AddColumn(Source, "Date", each Date.From(Text.From([DateTimeColumn]))),
TimeColumn = Table.AddColumn(DateColumn, "Time", each Time.From(Text.From([DateTimeColumn])))
in
TimeColumn
Thanks,
Proud to be a Super User! | |
PQ should recognise such a text and be able to set the data type to Date/Time.
Then, on the Add Column Ribbon and choose Date, Date Only in the From Date & Time group. Repeat that step for the time portion (Time, Time Only).
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.