作业帮 > 英语 > 作业

如何用access计算年龄

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/29 08:41:02
如何用access计算年龄
用[DepartureDate]和[Birthdate]进行计算,说明如下Calculate the difference between the Birthdate and DepartureDate; then divide the difference by 365.Use "\"symbol instead of"/"for the division.this will result in the largest number years without any decimal values(whole number of years)
作业做到这里有点不太明白了,
用[DepartureDate]和[Birthdate]进行计算,说明如下Calculate the difference between the Birthdate and DepartureDate; then divide the difference by 365.Use "\"symbol instead of"/"for the division. this will result in the largest number years without any decimal values(whole number of years).
我们先把说明翻译一下:计算出生日期和死亡日期之间的天数之差,然后用天数之差除以365.用"\"符号代替"/"做除法运算,之后将会得出不带小数点的最大整数.
待翻译后就很容易理解是什么意思了,希望能帮到你.
再问: 能麻烦告诉一下公式么?我理解它的意思,但是不会具体把它表示出来
再答: DateDiff("d", BirthDate, DepartureDate)\365,这样的话就可以得出结果。 另外给出: 根据出生日期计算年龄(周岁) IIf(Month(DepartureDate)-Month(BirthDate)>-1,Year(Departure)-Year(Birthdate),Year(DepartureDate)-Year(BirthDate)-1) 详细可见Access日期函数: http://wenku.baidu.com/view/6c5800a1284ac850ad02429a.html