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

## DATEDIFF

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
Super User

@tfernandez To get something like this,

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!

5 REPLIES 5
Super User

@tfernandez To get something like this,

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!

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.

Cuando debiese mostrarse así

¿Cupal podria ser el problema?

Super User

@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.

Frequent Visitor

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

Estare haciendo algo mal?

Super User

@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

#### Launching new user group features

Learn how to create your own user groups today!

#### Community & How To Videos

Check out the new Power Platform Community Connections gallery!

#### Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,199)