If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Compare dates
1- How can I compare various dates in Access query. For example, I have a
"purchase date", "sold date", with which i want to compare with a "start date" and "end date". The date format is dd/mm/yy. Can this comparison be done in 1 condition; i.e start date purchase date end date,.. 2- Can date comparison be put in an IIF statement in a query, because i always get #error when I use it. Thanks |
#2
|
|||
|
|||
Compare dates
Sure, but if the field name has spaces in it, you must use [ ] around it.
iif( [start date] [pourchase date] , "yo!", "arrrg!" ) if you use more than one condition, use something like: iif( [start date] [purchase date] AND [delivery date] [end date] , "All is fine", "We have a problem boss" ) Vanderghast, Access MVP "nisreenkh" wrote in message news 1- How can I compare various dates in Access query. For example, I have a "purchase date", "sold date", with which i want to compare with a "start date" and "end date". The date format is dd/mm/yy. Can this comparison be done in 1 condition; i.e start date purchase date end date,.. 2- Can date comparison be put in an IIF statement in a query, because i always get #error when I use it. Thanks |
Thread Tools | |
Display Modes | |
|
|