Convert Number Field to Date in Table

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.
 
S

Steve Schapel

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?
 
G

Guest

Example: June 26, 2006 is currently being stored in a number data type field
as 62606
 
J

John Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top