开发者

In Apple Numbers, how can I calculate a difference between two dates?

开发者 https://www.devze.com 2023-04-08 18:38 出处:网络
I have a spreadsheet with data in Apple Numbers.I have a column of dates, and I would like to create a second column which displays the difference in number of days between the two dates.

I have a spreadsheet with data in Apple Numbers. I have a column of dates, and I would like to create a second column which displays the difference in number of days between the two dates.

Example:

Date..开发者_Python百科................Difference

May 1, 2011......NA

May 3, 2011......2

May 8, 2011......5

My first inclination is applescript, but perhaps applescript might be overkill for this task.

In any case, please fwd as needed.


Applescript and Automator is definitely overkill. All you need to do given two dates is reference the cells in an equation and Pages handles the rest. So, given...

    'A'                 'B'
'1' '2011 September 28' ''
'2' '2011 September 27' ''
'3' '2011 September 20' ''

...you only need to do then...

    'A'                 'B'
'1' '2011 September 28' ''
'2' '2011 September 27' '=A2-A1' --> gives "1d"
'3' '2011 September 20' '=A3-A1' --> gives "8d"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号