CF_TIMEDIFF
The CF_TIMEDIFF function can be used to calculate the difference between two time values.
Enter the formula =CF_TIMEDIFF("<time unit>",<time value>,<time value>)
The following parameters need to be defined:
- A time unit within quotation marks (e.g. "ISOWEEK").
- A "start" time value or a cell reference to that time value (or a cell reference to a start time value).
- A "stop" time value or a cell reference to that time value (or a cell reference to a stop time value).
Example
=CF_TIMEDIFF("ISOWEEK",201049,201117) will return the value of 20 weeks.
=CF_TIMEDIFF ("ISODATE",20110125,20110617) will return the value 143 days.
With this function, you can easily calculate differences between different dates spanning over two years and so on.
Note: The separator in the formula depends on the culture you are using in the application. "," for en-US, ";" for sv-SE, and so on.