0

Days left in month

I am using the following formula to get the number of days left in the month:

COUNT_DAYS(TODAY("CEST"),(DATE_ENDOF(TODAY("CEST"),"month")))

For July 31st, which is today, the formula is returning "-1" instead of "0".

Any ideas why?

TIA

9 comments

  • 0
    Avatar
    Josh Cohen-Collier

    Hi Nitin,

    Thanks for posting in our Community!

    The reason why this is happening is that you are directly typing in the "month", instead of selecting it from the list.
    In this case, month is actually the number 3 behind the scenes.
    Can you try copy-pasting this formula?

    COUNT_DAYS(TODAY("CEST"),DATE_ENDOF(TODAY("CEST"),"3"))

    Let me know if this does not work!

    Best regards,
    Joshua
    _________________
    Joshua Cohen-Collier,
    Technical Support Engineer, Klipfolio

  • 0
    Avatar
    Nitin Gupta

    Hi Joshua:

    I picked "month" from the dropdown that is presented. I changed it to "month" when pasting it here cause I thought "3" would be confusing.

    The issue, it turns out, was that I was using CEST. When I remove the time zone, I get the right answer, which is "1". Do you know why adding the time zone causes that error as logically it should not.

     

    Thanks,

  • 0
    Avatar
    Josh Cohen-Collier

    Hi Nitin,

    In my example above, the timezone is CEST and it works correctly.
    Can you try using the above formula?

    Best,
    Joshua

  • 0
    Avatar
    Nitin Gupta

    I get "-1" again. Here's a screenshot: http://take.ms/Lh0Gmo

  • 0
    Avatar
    Josh Cohen-Collier

    Hi Nitin,

    If you check the Properties panel of the component, is there a prefix of "-"?
    I just tested that exact formula and it worked on my end.

    Best,
    Joshua

  • 0
    Avatar
    Nitin Gupta

    Just checked, no "-" prefix. I can send you a link to the klip if you want to take a look directly. My email address should be in your customer database.

  • 0
    Avatar
    Josh Cohen-Collier

    Hi Nitin,

    That would be great, thanks!
    Would you like me to open up a support ticket for this, so the correspondences are private?

    Best,
    Joshua

  • 0
    Avatar
    Nitin Gupta

    Yes, please. Thanks for the continued dialogue. 

  • 0
    Avatar
    Josh Cohen-Collier

    Hi Nitin,

    Done!
    You can just reply to the email with the details of the account and Klip.

    Best,
    Joshua

Please sign in to leave a comment.