By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,462 Members | 2,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,462 IT Pros & Developers. It's quick & easy.

Problem querying datetime in SQL Server

P: n/a
Access 2002 with linked tables to SQL Server 2000

I have a query that uses 2 unbound form fields as criteria.

This returns unexpected results.

Between IIf([forms]![frmreporting]![startdate] Is
Null,#1/1/1900#,[forms]![frmreporting]![startdate]) And
IIf([forms]![frmreporting]![enddate] Is
Null,#1/1/9999#,[forms]![frmreporting]![enddate])

This seems to work
Between IIf([forms]![frmreporting]![startdate] Is
Null,#1/1/1900#,[forms]![frmreporting]![startdate]) And
IIf([forms]![frmreporting]![enddate] Is
Null,#1/1/9999#,[forms]![frmreporting]![enddate]+1)

Is this reliable?
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.