Days remaining display problem

Viewing 5 reply threads
  • Author
    Posts
  • October 7, 2017 at 10:17 AM #25207

    tonyt
    Participant

    Hi
    Using this formula to calculate days between todays date and date due…

    ( [Set due date:] – NOW()) / 60 / 60 / 24

    And with decimal places set to 2 to prevent 0.2 days showing as 0′ is there a way I could get days remaining as just 1 or 2 or 0 if the two dates were the same. I do not want to have the decimal bit, just whole days even if its 11 pm and its due the next day I want it to show 1

    Hope thats as clear as mud and somepne can help

    Cheers….

    October 7, 2017 at 4:30 PM #25213

    Jose Monteiro
    Participant

    Hi,

    If you use the function FLOOR(Your-formula-here),
    if you have 0.9 for remaining days you will get 0.0 as the result;
    if you have 0.4 for remaining days you will get 0.0 as the result;
    if you have 1.9 for remaining days you will get 1.0 as the result;

    If you use the function CEIL(Your-formula-here),
    if you have 0.9 for remaining days you will get 1.0 as the result;
    if you have 0.4 for remaining days you will get 1.0 as the result;
    if you have 1.9 for remaining days you will get 2.0 as the result;

    Hope this helps,

    Jose

    October 7, 2017 at 11:03 PM #25221

    tonyt
    Participant

    Many thks, will give it a go and let you know!
    Cheers…..

    October 8, 2017 at 3:56 AM #25250

    tonyt
    Participant

    Ideal, it works fine, thanks again!

    October 8, 2017 at 8:32 PM #25271

    Brendan
    Keymaster

    Or you could use DAYS(Start Date, End Date). For example: DAYS([Set Due Date], TODAY())

    It returns the number of days between the two dates.

    October 9, 2017 at 1:55 AM #25280

    Jose Monteiro
    Participant

    Hi Brendan,

    Thanks for your suggestion that I was not aware of.
    Much simpler. :)

Viewing 5 reply threads

You must be logged in to reply to this topic.