cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BaronSdG
Resolver II
Resolver II

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

@BaronSdG , Two ways

 

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

 

or

 

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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@BaronSdG , 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])

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 ":")?

@BaronSdG , Two ways

 

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

 

or

 

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

@BaronSdG , 

 

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors