Convert four digit year to two digits.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to convert data for a new accounting system, and I imported
several fields of dates as text (ex: 06302005). Now I find out the database
is designed to only accept two digits years (ex: 063005). What is the
easiest way to update? Is there a wildcard placeholder I can use in the
replace function? If I replace "20" or "19" it will replace the day as well
as year. Thanks
 
If you are importing the data, convert it into a real date/time field in
Access.

You can do this by populating the date/time field in an Update query (Update
on Query menu in query design view). Use:
DateSerial(Right([d],2), Left([d],2), Mid([d],3,2))
where "d" repesents the name of the text date field.

If you are exporting the data, you can export it from a query that contains
this calculated field:
Format([d], "mmddyy")
where "d" represents the name of your date/time field.
 
Back
Top