there are 3 fields in task table-> expected_start_datetime,expected_end_datetime,time_allocated
While creating a task expected start and end datetime is selected and saved in the records.
What I am trying to do is to find the difference between the two dates in hours and minutes and save the value inside the "time_allocated" while creating the task and later on the update or view page use/display the time allocated value from the records.