krishnak
01-26-2011, 03:21 PM
Hi All,
I have an Access 2007 database with two columns - RefYear and RefMonth - with datatype as Integer. I want to add a computed column to this table of datatype DateTime, in the format 'RefYear/RefMonth'.
That is, if the RefMonth is 6 (not 06) and RefYear is 2010, I want the value in the new column to be '2010/6' and recognized as DateTime format.
I am finding it difficult to write queries with BETWEEN .. AND with integer values for RefYear and RefMonth.
Date is not important, but if the format requires it, the column value can be modified to '2010/6/1'.
If a computed column cannot be added, I can make a query with the same data.
Will someone please advise me how to do it?
I have an Access 2007 database with two columns - RefYear and RefMonth - with datatype as Integer. I want to add a computed column to this table of datatype DateTime, in the format 'RefYear/RefMonth'.
That is, if the RefMonth is 6 (not 06) and RefYear is 2010, I want the value in the new column to be '2010/6' and recognized as DateTime format.
I am finding it difficult to write queries with BETWEEN .. AND with integer values for RefYear and RefMonth.
Date is not important, but if the format requires it, the column value can be modified to '2010/6/1'.
If a computed column cannot be added, I can make a query with the same data.
Will someone please advise me how to do it?