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! 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,137)