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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JonathanS
Frequent Visitor

convert minutes to hours minutes and seconds

At the moment I am validating the time of use of a certain article having a start and end date, I have achieved the difference with datedif but the value is in minutes, how can I convert this into hours, minutes and seconds, thank you very much for your great

 

Time(Reporte([Diferencia],24),Reporte(mod([Diferencia],24),60))

Error .(

helpdiferencia.png

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @JonathanS ,

 

Please try this:-

Duration in Hours and Minutes = 
var _Minues=[Column1]
var _Hours=int( _Minues/60)
var _RemainingMinutes=MOD(_Minues, 60)
return
  _Hours&" Hours & "& _RemainingMinutes& " Minutes"

Output:-

Samarth_18_0-1647837268574.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @JonathanS ,

 

Whether the advice given by @Samarth_18  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

Samarth_18
Community Champion
Community Champion

Hi @JonathanS ,

 

Please try this:-

Duration in Hours and Minutes = 
var _Minues=[Column1]
var _Hours=int( _Minues/60)
var _RemainingMinutes=MOD(_Minues, 60)
return
  _Hours&" Hours & "& _RemainingMinutes& " Minutes"

Output:-

Samarth_18_0-1647837268574.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Perfect thank you very much for your collaboration

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.