Forum Discussion

KristaKrista's avatar
KristaKrista
Qrew Member
9 years ago

how to I set up the following duration formula?

I am trying to calculate the number of volunteer hours from a start date and end date of an event.  How do I set up the formula?

5 Replies

  • If event A starts at 8am and ends at 1pm the volunteer hours for that event will be 5 hours.  How do I get it to do the calculation to get the 5 hrs?
  • I suggest that you have two time of day fields types for input.

    Then ToHours([end time]-[start time])

    You may also want to do
    if(not IsNull([end time]) and not IsNull([Start Time]),ToHours([end time]-[start time]),0)
  • MichelleCoslet's avatar
    MichelleCoslet
    Qrew Assistant Captain
    How do you handle this situation if the [date created] is Date/Time and the [Date Finished] is just a date? I don't think I can change the Date Finished type at this point without messing up a lot of data. I just need the amount of days from start to finish.
  • np, convert the date/time to be a just date for the purposes of the formula

    [Date Finished] - ToDate([Date Created])

    The above would be a duration or

    ToDays([Date Finished] - ToDate([Date Created])) would be the number of Days ie a numeric result.