cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Edit Hour and minutes from previous date record using Dropdowns

Hello to all!

 

I have a date with time stored in an excel sheet, when I want to do the Patch and edit the content I can have the Default to retrieve the date, but the minutes and hour are not being retrieve.

See attachments.

 

Dates.JPG= The date with time record in a label

Dates edit.JPG= Show how I could retrieve the Date but not the minutes and Hour.

 

I tried using the MID function but when the hour has only 1 digit It will not work.

 

ANY IDEA FOLKS? Thanks for reading

Greetings from Costa Rica! Pura vida

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you for the help, I found the solution:

 

Hour(TimeValue(Gallery2.Selected.'Start Date'))

 

As the record is in a excel sheet (text value), Hour function expects a number value.  So the function TimeValue is what I had missing.

 

Problem solved. Thanks! 

View solution in original post

2 REPLIES 2
Super User III
Super User III

@jvargas 

To retrieve the Hours you can use this code in the Default property of the dropdown.

Hour(ThisItem.'Start Date')
Hour(ThisItem.'Finish Date')

 

For the minutes you can use this code.

 

Minute(ThisItem.'Start Date')
Minute(ThisItem.'Finish Date')

 

 

Please note that the dropdown for hours should have all numbers from 0-23 as an option to select while minutes should have all numbers from 0-59.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thank you for the help, I found the solution:

 

Hour(TimeValue(Gallery2.Selected.'Start Date'))

 

As the record is in a excel sheet (text value), Hour function expects a number value.  So the function TimeValue is what I had missing.

 

Problem solved. Thanks! 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (13,705)