March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have two columns in my database for date and time. The issue is they are entered as text.
Examples would be
082520 1258
051620 0700
Is there a way in power query to have these convert to a date and time field automatically? I was trying a custom column but can't figure out the code to use.
Thanks in advance.
Solved! Go to Solution.
Hi @kattlees ,
This is troublesome, maybe you can do this.
Please refer to my .pbix file.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @kattlees ,
This is troublesome, maybe you can do this.
Please refer to my .pbix file.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HI @kattlees
In power query you have a function if it helps.
DateTime.FromText()
https://docs.microsoft.com/en-us/powerquery-m/datetime-fromtext
Alternatively you can use the DAX functions DATE() and TIME()
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
@kattlees , in Dax
Date = date(right([col1],2), left([col1],2), mid([col1],3,2))
time = time(left([col2],2),right([col2],2),)
User | Count |
---|---|
117 | |
77 | |
58 | |
52 | |
46 |
User | Count |
---|---|
171 | |
117 | |
63 | |
57 | |
51 |