excel DATEDIF函数 计算工龄、账龄
时间:2022-10-30 18:58:52
某员工的入职时间与在公司预借款项的时间,计算其工龄与账龄。
在D2单元格中输入公式:=DATEDIF(C2,TODAY(),"y")&"年"&DATEDIF(C2,TODAY(),"ym")&"个月"&DATEDIF(C2,TODAY(),"md")&"天",然后按Enter键完成后向下下拉填充。
注:DATEDIF函数是返回两个日期之间相隔的时间。“YM”参数是表示忽略相隔的年数,返回月份数;“MD”是忽略两个日期之间的年数与月份数,返回天数。如果只是以粗略地月计算的话,公式可以写成:
=DATEDIF(C2,TODAY(),"m")/12,但是这样不能精确到天。同样地账龄也可以这样进行计算,同工龄的计算方法是一样的,如果是进行分布,可以参照上面的年龄的分布的方法做。
标签:DATEDIF函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
如何让Win10系统只显示指定文件类型的扩展名
2022-08-15 02:18:29
![](https://img.aspxhome.com/file/2023/30/a262669_0s.png)
excel如何将同一单元格内的多行文本拆分到多个工作表行
2023-05-23 03:06:36
![](https://img.aspxhome.com/file/2023/3/a156283_0s.jpg)
win7计算机快捷键没有了怎么办?将计算机图标锁定到任务栏的方法
2023-12-20 00:14:12
![](https://img.aspxhome.com/file/2023/29/a252407_0s.jpg)
wps表格怎么复制单元格
2023-11-30 03:46:09
win11不能直接把图片拉到任务栏的ps里怎么办?
2022-07-03 17:05:21
![](https://img.aspxhome.com/file/2023/30/a270017_0s.png)
在Excel中查找同名同姓,怎么出现了错误
2022-08-31 10:59:16
![](https://img.aspxhome.com/file/2023/2/a156902_0s.jpg)
没有系统的电脑怎么装系统?教你给电脑装系统
2022-05-18 12:54:59
![](https://img.aspxhome.com/file/2023/6/a321393_0s.png)
如何在Windows11“开始”菜单中隐藏或显示最常用的应用程序?
2022-02-28 02:28:36
![](https://img.aspxhome.com/file/2023/27/a237968_0s.png)
Win10如何打开服务管理器
2022-06-29 07:54:49
![](https://img.aspxhome.com/file/2023/26/a227395_0s.jpg)
Win10系统如何删除自定义图片历史记录?
2023-08-29 09:59:49
![](https://img.aspxhome.com/file/2023/26/a224172_0s.jpg)
Win10 20H1 Build 18932版 重点改进眼球控制功能
2022-08-17 09:27:48
![](https://img.aspxhome.com/file/2023/3/a302519_0s.png)
Win10 1909 hosts文件在哪?Win10 1909 hosts文件查看方法简述
2022-07-31 22:17:55
![](https://img.aspxhome.com/file/2023/26/a224352_0s.jpg)
excel表格如何取消密码
2022-12-08 21:16:46
excel 2021工作表同一列中的日期和时间如何快速批量拆分?
2022-10-30 01:10:19
![](https://img.aspxhome.com/file/2023/5/a140055_0s.jpg)
Win10系统怎么共享文件夹?小编教你快速共享文件夹的方法
2022-10-29 19:47:24
![](https://img.aspxhome.com/file/2023/25/a218098_0s.png)
wps演示如何制作卷轴动画效果
2022-05-12 11:51:12
Win系统管理员被禁用在安全模式下恢复方法
2023-07-02 23:28:32
![](https://img.aspxhome.com/file/2023/29/a258146_0s.jpg)
如何在word中根据现有模板创建文档
2023-10-16 14:48:11
![](https://img.aspxhome.com/file/2023/0/33080_0s.jpg)
Windows7 录制器工具录制视频的步骤
2023-08-27 04:36:13
![](https://img.aspxhome.com/file/2023/29/a259523_0s.jpg)
nvidia英伟达显卡错误代码0x0001怎么解决?
2022-06-17 12:42:05
![](https://img.aspxhome.com/file/2023/1/a274450_0s.png)