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

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

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

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

 

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

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)