年龄日期

编程入门 行业动态 更新时间:2024-10-28 11:28:04
本文介绍了年龄日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这显然已经多次完成了,但我看过的所有内容都是难以理解的,或者根本就不起作用。 这不适用于我的报告:datediff(yyyy,[DOB],现在()) 这也不是:= datediff(" yyyy",[ DOB],现在()) 有谁可以建议为什么? 关于如何做到这一点还有很多其他的建议,但是我什么都不能上班 。我只想在报告字段中输入年龄基于 某人的出生日期= DOB作为字段名。

This has apparently been done many times, but everything I''ve looked at is either incomprehensible or simply doesn''t work. This doesn''t work on my report: datediff("yyyy",[DOB],now()) Nor does this: =datediff("yyyy",[DOB],now()) Can anyone suggest why? There are many other suggestions as to how to do this, but I can''t get any to work. I just want to enter the age in a report field based on someone date of birth = DOB as fieldname.

推荐答案

ch**********@isuga.fr 写道: ch**********@isuga.fr wrote: 这显然已经完成了很多次,但是我看过的所有内容 要么难以理解,要么根本无法工作。 这对我的报告不起作用:datediff(yyyy,[DOB],现在()) 这也不是:= datediff(yyyy,[DOB],now()) This has apparently been done many times, but everything I''ve looked at is either incomprehensible or simply doesn''t work. This doesn''t work on my report: datediff("yyyy",[DOB],now()) Nor does this: =datediff("yyyy",[DOB],now())

那个应该有效。 DOB字段是空的吗? 你不能说什么不起作用所以很难确定什么是错的

That one should work. Is the DOB field empty? You don''t say what doesn''t work so it''s hard to determine what is wrong

> 有人能说明原因吗? 关于如何做到这一点,还有很多其他的建议,但是我不能得到 工作。我只想在报告字段中输入年龄,基于 某人的出生日期= DOB作为字段名。 > Can anyone suggest why? There are many other suggestions as to how to do this, but I can''t get any to work. I just want to enter the age in a report field based on someone date of birth = DOB as fieldname.

Hard告诉你问题是什么,但我现在可以告诉你,你不会总是用这个公式得到准确的答案。如果 日期是9月9日,并且这个人是10月4日出生的,他将会看起来比他实际年龄大一岁。 ch**********@isuga.fr 写道: Hard to tell what the problem is, but I can tell you right now you''re not always going to get an accurate answer using that formula. If the date is Sept 9 and the person was born Oct 4, he''s going to appear to be a year older than he really is. ch**********@isuga.fr wrote: 这显然已经多次完成了,但是我看过的所有内容 要么难以理解,要么根本无法工作。 这对我的报告不起作用:datediff(yyyy,[DOB],现在()) 这也不是:= datediff(yyyy,[DOB],现在()) 有人可以提出建议吗? 那里关于如何做到这一点还有很多其他的建议,但我不能得到 任何工作。我只想在报告字段中输入年龄,基于 某人的出生日期= DOB作为字段名称。 This has apparently been done many times, but everything I''ve looked at is either incomprehensible or simply doesn''t work. This doesn''t work on my report: datediff("yyyy",[DOB],now()) Nor does this: =datediff("yyyy",[DOB],now()) Can anyone suggest why? There are many other suggestions as to how to do this, but I can''t get any to work. I just want to enter the age in a report field based on someone date of birth = DOB as fieldname.

我使用一个功能来显示年龄: (注意 - 空气代码) 公共职能年龄(Bdate as date)为整数 年龄=年(日期) - 年(Bdate) ''如果受试者没有减去1今年有他们的生日 如果格式(日期,''mmdd'')<格式(Bdate,''mmdd'')然后 年龄=年龄 - 1 Endif 结束功能 Fred Zuckerman " ManningFan" < ma ******** @ gmail写信息 新闻:11 ********************* @ i3g2000cwc.googlegrou ps ... I use a function to display age: (caution - air code) Public Function Age(Bdate as date) as integer Age = Year(Date) - Year(Bdate) '' Subtract 1 if subject hasn''t yet had their birthday this year If Format(Date,''mmdd'') < Format(Bdate,''mmdd'') Then Age = Age - 1 Endif End Function Fred Zuckerman "ManningFan" <ma********@gmailwrote in message news:11*********************@i3g2000cwc.googlegrou ps... 很难说出问题所在,但我现在可以告诉你 并不总能使用该公式得到准确的答案。如果 日期是9月9日,并且这个人是10月4日出生的,他将会看起来比他实际年龄大一岁。 ch**********@isuga.fr 写道: Hard to tell what the problem is, but I can tell you right now you''re not always going to get an accurate answer using that formula. If the date is Sept 9 and the person was born Oct 4, he''s going to appear to be a year older than he really is. ch**********@isuga.fr wrote: 这显然已经多次完成了,但是我看过的所有内容 要么难以理解,要么根本无法工作。 这对我的报告不起作用:datediff(yyyy,[DOB],现在()) 这也不是:= datediff(yyyy,[DOB],现在()) 有人可以提出建议吗? 那里关于如何做到这一点还有很多其他的建议,但我不能得到 任何工作。我只想在报告字段中输入年龄,基于 某人的出生日期= DOB作为字段名称。 This has apparently been done many times, but everything I''ve looked at is either incomprehensible or simply doesn''t work. This doesn''t work on my report: datediff("yyyy",[DOB],now()) Nor does this: =datediff("yyyy",[DOB],now()) Can anyone suggest why? There are many other suggestions as to how to do this, but I can''t get any to work. I just want to enter the age in a report field based on someone date of birth = DOB as fieldname.

更多推荐

年龄日期

本文发布于:2023-10-26 07:25:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529473.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:年龄   日期

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!