数据类型不匹配 - CVDate [英] Data Type Mismatch - CVDate
问题描述
如果我可以获得以下代码的帮助,我将不胜感激
我一直得到数据类型不匹配当我使用标准时(< 120)。当我取消标准时,它工作正常。
数据库中的日期是不同的格式,即DOFD看起来像这个19941208(我转换为MM / DD / YYYY)另一个FPYD存储为120891(我也转换为MM / DD / YYYY)。
不幸的是我无法更新数据库日期,因为我不是唯一使用它的人。
@toadmaster
我认为问题在于如果 Len(NZ([FPYD], 0))= 1 ,您现在正在计算 Null 值和 CVDate(Mid
之间的天数([DOFD] ],5,2)& " /" &安培; Mid
([DOFD],7,2)& " /" &安培;左
I would greatly appreciate it if I could get help on the following code
I keep getting a "Data Type mismatch" when I use the criteria (<120). It works fine when I take off the criteria.
The dates in the database are in different formats i.e. DOFD looks like this 19941208(which I then convert to MM/DD/YYYY) on the other had FPYD is being stored as 120891(which I also then convert to MM/DD/YYYY).
Unfortunately I am unable to update the database dates because I am not the only one using it.
@toadmaster
I think that the problem lies in the fact that if Len(NZ([FPYD],0))=1, you are now calculating the number of Days between a Null Value and CVDate(Mid
([DOFD],5,2) & "/" & Mid
([DOFD],7,2) & "/" & Left
这篇关于数据类型不匹配 - CVDate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!