|
|
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.
|
|
hi,
MN wrote:
[Quoted Text] > 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 <--
|
|
Use the DateSerial function:
DateSerial(yyyy, mm, dd)
That being said, do you really need to have the data stored redundantly?
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!)
"MN" <MN[ at ]discussions.microsoft.com> wrote in message news:4414EE7A-2D62-4B95-9893-BF21A40DCCB8[ at ]microsoft.com...
[Quoted Text] > 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.
|
|
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.
"Stefan Hoffmann" wrote:
[Quoted Text] > hi, > > MN wrote: > > 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 <-- >
|
|
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 .
"Douglas J. Steele" wrote:
[Quoted Text] > Use the DateSerial function: > > DateSerial(yyyy, mm, dd) > > That being said, do you really need to have the data stored redundantly? > > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele> (no e-mails, please!) > > > "MN" <MN[ at ]discussions.microsoft.com> wrote in message > news:4414EE7A-2D62-4B95-9893-BF21A40DCCB8[ at ]microsoft.com... > > 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. > > >
|
|
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.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!)
"MN" <MN[ at ]discussions.microsoft.com> wrote in message news:5C073107-9E4B-4A56-B466-D00353084C21[ at ]microsoft.com...
[Quoted Text] > 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. > > "Stefan Hoffmann" wrote: > >> hi, >> >> MN wrote: >> > 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 <-- >>
|
|
Yes, you are right. It converted exactly to mm/dd/yyyy. Thanks you all for your reply. Best regards.
"Douglas J. Steele" wrote:
[Quoted Text] > 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. > > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele> (no e-mails, please!) > > > "MN" <MN[ at ]discussions.microsoft.com> wrote in message > news:5C073107-9E4B-4A56-B466-D00353084C21[ at ]microsoft.com... > > 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. > > > > "Stefan Hoffmann" wrote: > > > >> hi, > >> > >> MN wrote: > >> > 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 <-- > >> > > >
|
|
|