Number of days until end of month

Viewing 6 reply threads
  • Author
    Posts
  • February 24, 2018 at 4:43 PM #27464

    Tim Flick
    Participant

    I’m trying to determine based on the current date how many days remain the month

    Thanks Tim

    February 25, 2018 at 1:14 AM #27469

    Brendan
    Keymaster

    Hi Tim,

    You can use the EOMONTH(Date; X) function to determine the last day of the month. From that information you can find out how many days until the last day of the month by using the DAYS(X; Y) function.

    DAYS(TODAY(); EOMONTH(TODAY(); 0))

    Executing it today (February 25), gives a result of 3 days. Set the Return type to Number.

    Hope that’s what you’re looking for.

    Thanks!

    Brendan

    February 25, 2018 at 8:37 AM #27477

    Tim Flick
    Participant

    Thanks Brendan. For what reason I had to do it several times to get it to work

    February 25, 2018 at 12:04 PM #27478

    Brendan
    Keymaster

    The most common thing I’ve seen from customers for why a formula doesn’t work is either missing parameters or forgetting closing parentheses. So perhaps one of those reasons caused it not to work. Not sure.

    February 26, 2018 at 5:39 AM #27489

    Tim Flick
    Participant

    Actually I did a cut and paste from what you sent but it now works THANKS

    February 26, 2018 at 7:08 AM #27490

    Tim Flick
    Participant

    The next day you have to go to the list view to recalculate in order to get the correct remaining days in the month

    February 26, 2018 at 9:27 AM #27493

    Brendan
    Keymaster

    For that particular formula, cutting and pasting should have worked. Not sure why it didn’t. Maybe an invalid character got in there.

    Right. Tap Forms doesn’t automatically recalculate the current date until you explicitly tell it to.

    The reason I made it like this is because when I used to have it automatically re-calculate the current date for you, I managed to get Tap Forms into a sync loop that would never stop. What that means is if all the dates were recalculated automatically, that would trigger a sync, which would update to the other devices, which would then refresh the records list, which would cause a recalculation of the dates again, which would trigger a sync back to the original device, which would then refresh the display causing the dates to be recalculated again… and so on. So that’s why I made the refresh a manual process.

    Thanks,

    Brendan

Viewing 6 reply threads

You must be logged in to reply to this topic.