cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SimonMeadows Resolver I
Resolver I

Text() Function how to return only minutes

I am trying to get minutes only from a time value.

I initially assumed I could do:

Text(Start,"[$-en-US]mm")

But this returnes the wrong value.

I looked at the Text() documentation and found:

mmDisplays the minute as a number with a leading zero when appropriate. Note: The m or the mm placeholder must appear immediately after the h or hh placeholder or immediately before the ss placeholder. Otherwise, Text returns the month instead of minutes.

 

This suggests it is not possible to return only minutes from a date or time function.

Most functions to format timevalues provide 'MM' insetad of 'mm' for minutes.

So far the only way I have found to return only the minues is this:

Right(Text(Start,"[$-en-US]hh-mm"),2)

There must be a simpler way to return just minutes without having to trim strings.

1 ACCEPTED SOLUTION

Accepted Solutions
KMI-Keith Advocate IV
Advocate IV

Re: Text() Function how to return only minutes

I think there is a Minute() syntax. I am trying to use it like so

Minute( Now() )

for a timestamp situation I am trying to figure out. Not sure if this would work for you, I dont know much about PowerApps yet.

Good Luck!

 

View solution in original post

2 REPLIES 2
KMI-Keith Advocate IV
Advocate IV

Re: Text() Function how to return only minutes

I think there is a Minute() syntax. I am trying to use it like so

Minute( Now() )

for a timestamp situation I am trying to figure out. Not sure if this would work for you, I dont know much about PowerApps yet.

Good Luck!

 

View solution in original post

SimonMeadows Resolver I
Resolver I

Re: Text() Function how to return only minutes

I had forgotten about the other time functions however I need the minutes in the two digit format which would require:

Text(Minute(Now()),"00")

 

Thanks for the suggestion.

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,380)