I received a number of questions lately from students on how to substract two values in fields or variables of the dataype Time.
1. Assume you have 3 variables:
- " Start Time": Datatype = Time (09:00)
- "Ending Type": Datatype = Time (17:00)
- "Total Hours": Datatype = DECIMAL
Solution:
"Total hours":=("End Time"-"Start Time")/3600000;
"Total hours" will be 8
2. Assume you have 3 variables:
- " Start Time": Datatype = Time (09:00)
- "Ending Type": Datatype = Time(17:00)
- "Total Hours": Datatype = DURATION
Solution:
"Total hours":="End Time"-"Start Time";
"Total hours" will be 8 hours
Short one but I hope it helps :-)!
Comments