Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

HH:MM:SS to integer

Hi,

 

Need help on converting HH:MM:SS to Integer in power bi report builder.

 

1. using SQL Query, created Data source and Data sets in Power Bi report builder.

2. have column HH:MM:SS (01:00:00) need to convert to the decimal number as we do in excel. (example .343444)

 

 

 

Please le me know if you need further details,

 

Regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

What unit do you want it to display? Hours, minutes or seconds?

You can just convert time to integer using sql.
How to convert hh:mm:ss to seconds in SQL Server with more than 24 hours - Stack Overflow

How to display a time span of seconds in hh:mm:ss format in Reporting Services - Stack Overflow

 

If you want to calculate in report builder. You will need to sum the field using split. Please refer to the split expressions in reply, just sum the hours*3600+minute*60+seconds.

Totalling HHMMSS in SSRS (microsoft.com)

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 

What unit do you want it to display? Hours, minutes or seconds?

You can just convert time to integer using sql.
How to convert hh:mm:ss to seconds in SQL Server with more than 24 hours - Stack Overflow

How to display a time span of seconds in hh:mm:ss format in Reporting Services - Stack Overflow

 

If you want to calculate in report builder. You will need to sum the field using split. Please refer to the split expressions in reply, just sum the hours*3600+minute*60+seconds.

Totalling HHMMSS in SSRS (microsoft.com)

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@Anonymous 

Check if this works:

New Column = HOUR([TimeColumn]) + MINUTE([TimeColumn])/60 + SECOND([TimeColumn])/60/60
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors