sorcerer11
MIS
Hi Everybody,
I have database in which I create an expression within a query.
Real Date: IIf([ShiftPat]="Night",[CDate]-1,[CDate])
It supposed to change dates to match a shift pattern, which it does fine. I then create another query based on this, in which I want to select all data between two dates. But the query seems to treat them like text and not dates and brings in some very strange dates.
Is their anyway I can tell access that this is a date and not a text string. I have tried using DateValue but it doesn't seem to make any difference.
Anybody got any ideas.
Thanks
I have database in which I create an expression within a query.
Real Date: IIf([ShiftPat]="Night",[CDate]-1,[CDate])
It supposed to change dates to match a shift pattern, which it does fine. I then create another query based on this, in which I want to select all data between two dates. But the query seems to treat them like text and not dates and brings in some very strange dates.
Is their anyway I can tell access that this is a date and not a text string. I have tried using DateValue but it doesn't seem to make any difference.
Anybody got any ideas.
Thanks