Calculate a date?

Viewing 2 reply threads
  • Author
    Posts
  • January 23, 2014 at 2:43 AM #8863

    Yogie
    Participant

    Hi,

    does anybody know how to calculate a date based on a given date?

    I tried to calculate in a new column a date based on a previous column:

    (date-column)-14

    but it seems not to work!

    Cheers
    Yogie

    January 23, 2014 at 8:42 AM #8865

    Leo
    Participant

    Convert the 14 days into seconds i.e. 60*60*24*14

    60 seconds *
    60 minutes *
    24 hours *
    14 days

    I think this will work.

    Leo

    January 23, 2014 at 8:52 AM #8866

    Leo
    Participant

    I tried it. But nope…doesn’t work… With timefield it does (if I remember it correctly) but not on datefields.

    Leo

    January 23, 2014 at 5:00 PM #8870

    Brendan
    Keymaster

    When you use a date in a calculation, Tap Forms is substituting the Unix epoch time for the date value. The Unix epoch time is the number of seconds that have passed between January 1, 1970 until the date specified or the current date if you use $now in your formula. So if you’re subtracting two date/times for example, you’ll get the number of seconds between those two date/times. Using math you can convert those to other units. But Tap Forms won’t generate a new absolute Date or Time value for you. I know that’s something I’d like to add support for.

Viewing 2 reply threads

You must be logged in to reply to this topic.