Convert Number Field to Date in Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Another Department created an Access Database. Rather than using a Date
field in their table to hold date information for records, they set the data
type of the field to number. They have over a 1000 records in the table
already and now want to run queries against the data based on dates--which
are stored as numbers. Is there an easy way to convert this number field to
a date field without losing data. I tried just changing the data type on a
copy of the table, but then the date information gets fouled up. Any help is
appreciated.
 
Janna,

This will probably be possible, but can't advise specifically without
knowing the numbering system being used. Can you give some example of
the numbers that are in the table, and the dates they represent?
 
Example: June 26, 2006 is currently being stored in a number data type field
as 62606

Assuming that July 1 is stored as 70106 (rather than... eep... as
7106!) try

CDate(Format([numberdate], "#/00/00"))

John W. Vinson[MVP]
 
Back
Top