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

Don'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.

Reply
Anonymous
Not applicable

Extracting only minutes and seconds from a date

Hi all,

 

I need to have on a visual on the X axess only the minutes and seconds of a date format.

 

I have a timestamp as 10.08.2021 00:28:00 and I tried to extract the minutes and seconds by using the MID or RIGHT formula, but they are not working as they return a string, which cannot be used in the graph as a continuous variable (the order of the time is in disorder).

 

There isn't a built in format to on get only hour and minutes, so how to solve it?

1 ACCEPTED SOLUTION

@Anonymous , Two ways

 

Time(0,minute([Date time]),Second([Date time]) )

 

or

 

minute([Date time]) & ":" & Second([Date time])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , if this in string format Right and Mid will help

 

if this datetime use minute and second DAX functions

 

Minute([Date Time]*60 + Second([Date Time])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

 

So if I use Minute([Date Time]*60 + Second([Date Time]) this will return a column with minute:seconds in this format (with the coma ":")?

@Anonymous , Two ways

 

Time(0,minute([Date time]),Second([Date time]) )

 

or

 

minute([Date time]) & ":" & Second([Date time])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@Anonymous , 

 

You can use below DAX.

FORMAT(financials[Date],"HH:MM:SS") this gives in the format 12:00:00
FORMAT(financials[Date],"MM:SS") this works for you.




If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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