In our database, the publication year and month are saved in different columns, the query is to find out the pubs after 7/1/2006. My following query works but not get the desired dataset, e.g. publications during 10/1/2006 to 12/31/2006 was not listed in the result. I am frustrated, please help! Thanks very much.
PS.
I tried to use DataValue(), but it always gives 'Datatype mismatch..."err or (there's no null value, all values seem are date type for me).
Code:
SELECT Publications.PubYear, Publications.PubMonth, format(mid(PubMonth,1,3) & ' 1,' & PubYear, 'short date') AS Expr2,mid(PubMonth,1,3), IsDate(DateValue(format(mid(PubMonth,1,3) & ' 1,' & PubYear, 'short date'))) FROM [select * from publications where PubYear is not null and pubMonth is not null and (pubyear=2006 or pubyear=2007)]. as Publications where format(mid(PubMonth,1,3) & ' 1,' & PubYear, 'short date') >= #2006-07-01#
I tried to use DataValue(), but it always gives 'Datatype mismatch..."err or (there's no null value, all values seem are date type for me).
Comment