Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone!
I'm looking for a way to convert whole number to time format like this:
900→9:00
0→0:00
Solved! Go to Solution.
If you want to use Power Query, you will do this.
Time.From(
Text.From(
Number.IntegerDivide([Column1],100)
)
& ":" &
Text.End(
Text.From([Column1]),
2)
)
It will be converted to a legitimate time of 9am assuming that 900 is the integer in Column1
The following in DAX will work on a calculated column.
Column =
TIME( ROUND(
[Column1] / 100,
0
), VALUE(
RIGHT(
FORMAT(
[Column1],
"#"
),
2
)
), 0 )
None of these solutions assume that the last two digits are always 00. So 945 would be converted to 9:45 both times.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you soooo much!!!
If you want to use Power Query, you will do this.
Time.From(
Text.From(
Number.IntegerDivide([Column1],100)
)
& ":" &
Text.End(
Text.From([Column1]),
2)
)
It will be converted to a legitimate time of 9am assuming that 900 is the integer in Column1
The following in DAX will work on a calculated column.
Column =
TIME( ROUND(
[Column1] / 100,
0
), VALUE(
RIGHT(
FORMAT(
[Column1],
"#"
),
2
)
), 0 )
None of these solutions assume that the last two digits are always 00. So 945 would be converted to 9:45 both times.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |