Days between dates

Viewing 2 reply threads
  • Author
    Posts
  • November 26, 2018 at 10:50 AM #32104

    Eddzo
    Participant

    Hi,
    I created a table where I want to count the number of days between days.
    I’m not clear as to how I’m suppose to format the date in the formula edit box.
    I tried several combinations and I’m getting a funcky repetitive date.

    Days(x;y)
    Days (10/22/2018;Date)
    Keeps saying December 31,1969

    I have pictures below

    Attachments:
    You must be logged in to view attached files.
    November 26, 2018 at 12:00 PM #32108

    Federico Martinez
    Participant

    There are a couple of ways to do this:
    option 1 use 2 date fields and specify second date on a table; first SS
    option 2 if you want to compare to say today use the TODAY() function; second SS
    option 3 if you really want to specify the date in the code use the NEWDATE() function; third SS

    Attachments:
    You must be logged in to view attached files.
    November 26, 2018 at 1:48 PM #32124

    Brendan
    Keymaster

    @Eddzo, the date value you passed in might look like a valid date to a human, but it’s not a valid date according to Tap Forms. So you have to tell Tap Forms how to interpret your date value before it knows what you’re talking about.

    To convert 10/22/2018 into a real date value, you need to use the DATE() function.

    For example:

    DATE("10/22/2018"; "MM/dd/yyyy")

    This will tell Tap Forms how to interpret the human readable date format into an actual date value the computer can understand.

    So your full example would be:

    DAYS(DATE("10/22/2018"; "MM/dd/yyyy"); Date)

    Hope that helps!

Viewing 2 reply threads

You must be logged in to reply to this topic.