Calculating the Date N Years Later from a Date in "Date" / "Date and Time" Field

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.

Example using a "Date and time" field

Place a Date and time field and a Calculated field on your app form, then specify one of the formulas shown below in the Calculated field.

  • Formula to calculate N years later date and time: Date_and_time+(N*60*60*24*365)
  • Formula to calculate N days later date and time: Date_and_time+(N*60*60*24)
  • Formula to calculate N hours later date and time: Date_and_time+(N*60*60)
  • Formula to calculate N minutes later date and time: Date_and_time+(N*60)