开发者

VBScript handing a sql value of 1900-01-01 00:00:00.000

开发者 https://www.devze.com 2023-03-01 08:26 出处:网络
I have a problem that I cannot figure out.I am sure it si simple for the experts.I have a sql datetime field that is populated with a value of NULL or 1900-01-01 00:00:00.000.I just need an if statmen

I have a problem that I cannot figure out. I am sure it si simple for the experts. I have a sql datetime field that is populated with a value of NULL or 1900-01-01 00:00:00.000. I just need an if statment to check for both. I have tried: isNUll, eqaul to null, equal to nothing, equal to "". But t开发者_JS百科hey keep missing the value of 1900-01-01 00:00:00.000.

If IsNull(MyDate) or MyDate = "" then
   'Do Something
end if

Thank you


I think you're just looking for #1900-01-01#...

If IsNull(MyDate) or MyDate = "" or MyDate = #1900-01-01# Then
   'Do Something
End If
0

精彩评论

暂无评论...
验证码 换一张
取 消