create a single date column from seperate month, day and year colu

  • Thread starter Thread starter UGAJohn
  • Start date Start date
U

UGAJohn

The data I received came with the month day and year seperated out into
seperate columns. I manage to concantenate the date to show i.e. 112002 or
10102002 representing 1/1/2002 and 10/10/2002. What can I do to create a
date field from this or should I use the seperate columns to create a date
field.

Thanks
 
should I use the seperate columns to create a date field.
Yes -- Your 112002 will be a problem as well as 1112002. Is the latter 1
NOV 2002 or 11 JAN 2002.

If all dates are 8 digits then the below will work --
CVDate(Right([ENTER DATE],4) & "/" & Left([ENTER DATE],2) & "/" & Mid([ENTER
DATE],3,2))
 
The data I received came with the month day and year seperated out into
seperate columns. I manage to concantenate the date to show i.e. 112002 or
10102002 representing 1/1/2002 and 10/10/2002. What can I do to create a
date field from this or should I use the seperate columns to create a date
field.

Thanks

If you have three number fields for month, day and year, use

DateSerial([yearfield], [monthfield], [dayfield])

to calculate an Access Date/Time field.

Concatenation will produce an ambiguous number, not a date.
 
Back
Top