Calculating future dates and times, such as N years later

Article Number:040748

This can be done by setting up a formula with time specified in seconds.
In kintone, values in Date, Time, and Date and time fields are treated as UNIX time. This means that dates and times are treated in seconds, so you need to use seconds as the unit of time in your formula. For example, enter "60" to indicate one minute. Enter "3600" or "60*60" to indicate one hour, and enter "86400" or "60*60*24" to indicate one day. For details, refer to the following page.
Calculation of Date, Time, and Date and time

Example settings

In this example, dates and times are calculated using the time set in a Date and time field.
Add a Date and time field and a Calculated field, and then enter the following formula in the Calculated field. Select Date & time (Aug 06, 2012 2:03 PM) as the display format.
For more information on Calculated fields, refer to the following page.
Calculated fields

  • Formula to calculate N years later: Date_and_time+(N*60*60*24*365)
    In this example, a year is calculated as 365 days. This calculation does not support leap years (366 days).
  • Formula to calculate N days later: Date_and_time+(N*60*60*24)
  • Formula to calculate N hours later: Date_and_time+(N*60*60)
  • Formula to calculate N minutes later: Date_and_time+(N*60)

To calculate past times, such as N years ago, use a minus sign (-) instead of a plus sign (+) in the above examples.