converting 3 x number fields to create date field

V

vw

Is there a simple solution to converting day, month and
year fields presently in a number format, to one date
field?
I'm assuming I need to get each field to two integers
first? EG I have DD field which shows 7, MM field which
shows 1, YY field which shows 3 (for 03). Together would
read 1/7/3, instead of 01/07/03 on conversion.
Sorry, not much cop with access. Do I need to use the
substring command to bring in missing 0's first or is
there an easier way?
Cheers
 
K

Ken Snell

Here's one way:

Format(DateSerial([Yearfield], [Monthfield], [Dayfield]), "mm/dd/yy")
 
V

vw

thks Ken, that worked a treat...
-----Original Message-----
Here's one way:

Format(DateSerial([Yearfield], [Monthfield], [Dayfield]), "mm/dd/yy")

--

Ken Snell
<MS ACCESS MVP>

Is there a simple solution to converting day, month and
year fields presently in a number format, to one date
field?
I'm assuming I need to get each field to two integers
first? EG I have DD field which shows 7, MM field which
shows 1, YY field which shows 3 (for 03). Together would
read 1/7/3, instead of 01/07/03 on conversion.
Sorry, not much cop with access. Do I need to use the
substring command to bring in missing 0's first or is
there an easier way?
Cheers


.
 

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