Hello, what I am trying to do is get the values from two dropdowns and make them time value type, and then get the decimal value. something like "2:30" would be 2,5.
When I try:
TimeValue((Dropdown1.Selected.Value & ":" & Dropdown2.Selected.Value))/1000/60/60
It gets me a plus five difference son "2:30" gives me 7,5.
Any helpo or suggestions on how to do this would be great, thanks
The difference you're seeing is likely due to the time zone information from your location. There are a couple of options you can use:
Value(Dropdown1.Selected.Value) + Value(Dropdown2.Selected.Value) / 60
TimeValue(("2" & ":" & "30"))/1000/60/60 - TimeZoneOffset(Date(1970,1,1))/60
Hope this helps!
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.