cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tfernandez
Frequent Visitor

DATEDIFF

tfernandez_0-1621743001374.png

Buenas, necesito calcular las horas entre las fechas que aparecen arriba, la idea es calcular las horas extras de un empleado, he intentado muchas veces usar el datediff, pero no hay resultado, por favor, ayuda.

 

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Community Champion
Community Champion

@tfernandez To get something like this,

CNT_0-1621749716730.png

Use this formula,

"Minutes: " & DateDiff(DateTimeValue(date1.SelectedDate & " " & hour1.Selected.Value &":" & minute1.Selected.Value), DateTimeValue(date2.SelectedDate & " " & hour2.Selected.Value &":" & minute2.Selected.Value), Minutes)
"Hours: " & DateDiff(DateTimeValue(date1.SelectedDate & " " & hour1.Selected.Value &":" & minute1.Selected.Value), DateTimeValue(date2.SelectedDate & " " & hour2.Selected.Value &":" & minute2.Selected.Value), Hours)

Remember: Set the Format of the DatePicker to ShortDate.

Hope this helps! 

View solution in original post

5 REPLIES 5
CNT
Community Champion
Community Champion

@tfernandez To get something like this,

CNT_0-1621749716730.png

Use this formula,

"Minutes: " & DateDiff(DateTimeValue(date1.SelectedDate & " " & hour1.Selected.Value &":" & minute1.Selected.Value), DateTimeValue(date2.SelectedDate & " " & hour2.Selected.Value &":" & minute2.Selected.Value), Minutes)
"Hours: " & DateDiff(DateTimeValue(date1.SelectedDate & " " & hour1.Selected.Value &":" & minute1.Selected.Value), DateTimeValue(date2.SelectedDate & " " & hour2.Selected.Value &":" & minute2.Selected.Value), Hours)

Remember: Set the Format of the DatePicker to ShortDate.

Hope this helps! 

View solution in original post

tfernandez
Frequent Visitor

Hola! 

Al parecer la formula sirve perfectamente, ahora el problema que tengo es que al darle play a mi aplicacióin no me muestra la información para probarla. 

tfernandez_0-1621945766117.png

Cuando debiese mostrarse así 

 

tfernandez_1-1621945799732.png

¿Cupal podria ser el problema?

CNT
Community Champion
Community Champion

@tfernandez For some reason your controls are not visible. Check their visible property.

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

tfernandez
Frequent Visitor

Ecaxtamente, cambie la configuraci´´on y ya puede vers, sin embargo la formula no tuvo resultado.

tfernandez_0-1621947133376.png

Estare haciendo algo mal?

 

CNT
Community Champion
Community Champion

@tfernandez 

Remember: Set the Format of the DatePicker to ShortDate.

Hope this helps!

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,432)