Forum Discussion
- QuickBaseCoachDQrew CaptainThere is not enough information to be able to do that calculation, since we do not know the day of the start and the stop.
You need to record the start date and the start time and the end date and the end time. That can be done either with 4 fields or two fields of type "date/time". - _anomDiebolt_Qrew EliteToDays([tod2] - [tod1]) will return a number as fraction of a day.
ToHours([tod2] - [tod1]) will return the number of integer hours and a decimal representing the fraction of hours. - QuickBaseCoachDQrew Captain... assuming that all data entry is done on the same day and does not cross midnight.
I was confused because Raj said "in terms of days and hours.- RajHelaiyaQrew CaptainDo you mean the start date and end date should be same day? My use case is something like this:
Start date can be 1st dec and end date can be 5th dec. Also I need to know the time of start day and end day so I can display a result. For example: "Outage Duratio" was 4 days and 7 hours. Can this be achieved? - QuickBaseCoachDQrew CaptainYes no problem, but let me know what you are fields are which are capturing the start date and end date. i suggest that you make fields for those and btw, a user tip is that if you type a T into a date field it will populate to today.
So you may want to default the start date to the current day and then users will type a T to set the date when the ticket is closed, as well as the time. or else you can have a form rule to check a checkbox that will set the end date to today and the end time to now. - RajHelaiyaQrew CaptainThank you for your help, I tweaked my field types and was able to find the solution in "Days Format".
- _anomDiebolt_Qrew EliteI was confused because I answered a question without using JavaScript. Its gonna be a bad day - we have 7 inches of snow coming ...