日期比较不起作用 [英] Date comparison not functioning

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

问题描述

你好,我的项目已经完成......只是注意到我的日期没有正确比较......只有在返回日期的年份少于外出日期的时候才有效...帮助我pleaaaasee =)


注意:我将日期分成3个部分

例如:

takeoutday,takeoutmonth和takeoutyear

返回日,返回月份和返回年份

展开 | 选择 | Wrap | 行号

解决方案

逐步完成代码并检查分配给tdate的值a nd rdate是你期望它们的值。


先生笑脸,是的......它实际上是相同的值...

例如,如果takeoutdate = 2 / 3/2013和returndate = 1/5/2012 ...它确定...但是如果takeoutdate = 2/3/2013并且返回日期= 1/3/2013它不会让我警觉我更改返回日期=(

如果您创建的示例数据库只包含表单,相关控件和那段代码,我将很乐意花一些时间查看它。您可以将其上传为压缩文件。


hello there, my project is done...just noticed that my dates are not comparing properly ... it''s working only if the year of returned date is less than the year of takeout date ... help me pleaaaasee =)

note: i divided the dates into 3 parts
e.g.:
takeoutday, takeoutmonth and takeoutyear
returnedday, returnedmonth and returnedyear

Expand|Select|Wrap|Line Numbers

解决方案

Step through your code and check that the values assigned to tdate and rdate are the values you expect them to be.


sir Smiley, yes ... its actually same value ...
for example if takeoutdate = 2/3/2013 and returneddate = 1/5/2012 ... its ok... but if takeoutdate = 2/3/2013 and returneddate = 1/3/2013 it doesnt alarm me to change returned date =(


If you make an example database containing just the form, the relevant controls, and that piece of code, I will be happy to spend some time looking it. You can upload it as a zipped file.


这篇关于日期比较不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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