Discussions

Expand all | Collapse all

Calculate the difference between two dates

  • 1.  Calculate the difference between two dates

    Posted 28 days ago
    I have a formula numeric field (called Duration) where I'd like to show in days (excluding weekends) the difference between the start date (date field) and end date (date field).  I'm using the following formula, but the number in the Duration field is not right (([End Date:] - [Start Date:]) / Days(30)).  

    Please let me know what am I doing wrong.

    Thank you!

    -g

    ------------------------------
    Gwen Peters
    ------------------------------


  • 2.  RE: Calculate the difference between two dates

    Posted 28 days ago
    Try this

    ToDays([end date]-[start date])

    You may need to do 

    ToDays([end date]-[start date]) + 1

    if you want to count both the start and end days as days.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Calculate the difference between two dates

    Posted 24 days ago

    Thank you Mark, the solution below worked perfectly!

     

    Gwen Peters

    Director of Global Events

    Direct: 747.242.2826 | Cell: 805.844.4927 | Main: 818.223.9008 | Web: www.BlackLine.com

    Gwen.Peters@blackline.com

     

    Keep up with what's new in Modern Finance:

    Twitter | LinkedIn | Modern Finance Blog