cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jvargas
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
mdevaney
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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (64,866)