Convert number to date field?

M

MN

Hi,
I have a tableA have 3 number fields mm,dd,yyyy.
How do I write update to another table have a date field DOB in tableB?
Thanks you in advance.
 
S

Stefan Hoffmann

hi,
I have a tableA have 3 number fields mm,dd,yyyy.
How do I write update to another table have a date field DOB in tableB?
Use DateSerial() to create your date.



mfG
--> stefan <--
 
D

Douglas J. Steele

Use the DateSerial function:

DateSerial(yyyy, mm, dd)

That being said, do you really need to have the data stored redundantly?
 
M

MN

Thank for reply,
But the dateserial in the format of (yyyy,mm,dd) how do I convert it back to
(dd,mm,yyyy)
Thanks you.
 
M

MN

Thanks Douglas for your reply.
I am in the process converting a sybase DB to MS Access. So in the previous
they have 1 table store DOB file in three separate fields, now in my table
have only 1 DOB fields ! So I am very bad in table design - I completely
forgot it date fields in my table.
So, how can I convert DOB field become mm/dd/yyyy ?
Thanks you .
 
D

Douglas J. Steele

dd,mm,yyyy is simply a format: how the value is displayed. It has nothing to
do with how the value is stored. In actual fact, dates in Access are stored
as eight byte floating point numbers where the integer portion represents
the date as the number of days relative to 30 Dec, 1899 and the decimal
portion represents the time as a fraction of a day.
 
M

MN

Yes, you are right. It converted exactly to mm/dd/yyyy.
Thanks you all for your reply.
Best regards.
 

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