--- shankar k n <[EMAIL PROTECTED]> wrote:
> SELECT * FROM Audit where (format(AuditDate,'Short
> Date') between #2/2/2006# and #2/9/2006#)
> 
Okay as you mentioned if you use a 2 digit date
everything works fine... so?  that begs the question
why not simply use a 2 digit date?

"SELECT * FROM Audit WHERE (Format(AuditDate,'Short
Date') BETWEEN #02/02/2006# AND #02/09/2006#);"

This can be done dynamically if you need to by
replacing the dates with...

"BETWEEN #" & Format(CDate("2/2/2006"), "mm/dd/yyyy")
& "# AND #" & Format(CDate("2/9/2006") & "#);"

or something similar to that depending upon your exact
implementation of the SQL string.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessVBACentral/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to