年龄功能的问题 [英] Problems with the age function

查看:89
本文介绍了年龄功能的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试找到一个年龄函数时,我发现它并不像我想要的那样工作......这就是我想做的事情:我希望年龄函数首先询问用户一个问题(你的出生日期是什么?)但是,无论我如何格式化它,功能都无法正常工作我试图使用as string和DateDiff()但似乎没有任何作用...如果有人能想出这样做的方法我会很感激...

亲切的问候,

Marren02

Hi, Whenever I try and find an age function I find that it doesn''t work the way I want it to... Here''s what I want to do: I want the age function to first ask the user a question ("What is your date of birth?") However, no matter how I formatted it the function would not work I have tried to use "as string" and DateDiff() but nothing seems to work... If anyone can come up with a method of doing this I''d appreciate it...
kind regards,
Marren02

推荐答案

您能告诉我们您尝试过哪种代码吗?你的描述很模糊。从用户那里获取日期,或计算年龄或什么都有问题?


哦,你使用的是什么版本的VB?
Can you show us what sort of code you have tried? Your description was pretty vague. Are you having trouble with getting the date from the user, or in calculating the age, or what?

Oh, and what version of VB are you using?



您能告诉我们您尝试过哪种代码吗?你的描述很模糊。您是否在从用户那里获取日期,或计算年龄或什么时遇到问题?


哦,您使用的是什么版本的VB?
Can you show us what sort of code you have tried? Your description was pretty vague. Are you having trouble with getting the date from the user, or in calculating the age, or what?

Oh, and what version of VB are you using?



我使用的版本是VB 6.0

我已经尝试过网络上的例子,令人惊讶的是我不能这样做:

The version I am using is VB 6.0
I have tried examples from the web which suprisingly don''t work like:

展开 | 选择 | Wrap | 行号



我使用的版本是VB 6.0

我已经尝试过网上的例子,令人惊讶的是不能这样工作:
The version I am using is VB 6.0
I have tried examples from the web which suprisingly don''t work like:



在复制和粘贴代码之前,你需要了解一下首先。


您使用的代码不是VB 6.0代码,即。 NET代码。

Before copying and pasting the code you need to understand that first.

The code you are using is not VB 6.0 code ,that is .NET code.


这篇关于年龄功能的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆