Trouble Again.

  • Thread starter Thread starter Van T. Dinh
  • Start date Start date
V

Van T. Dinh

While you are working with DateTime, please change the time on your computer
to the correct time.

Van T. Dinh
MVP (Access)
 
I hate to ask again....... but again I need help.

I moved a dBase table into Access 2000. There in one glitch I can't seem to
square away.

Because of DOS and the year 2000 change, when 1999 turned into 2000, dBase
(DOS) reverted back to the year 1900. As dates were entered into the
records, the dates became 1901, 1902, and so on.

I have got to replace the year 19xx with 20xx. The month and day must stay
the same. This is where my problem is. I have tried DateAdd, DatePart, the
new VBA Replace Function (I know it only works with strings but I tried
converting, etc.) and several code sniplets I'm too embarrassed to tell you
about......

Can you help?

Thanks

Becker
(e-mail address removed)
 
Query using right

Create 3 new fields in your table

Last2 Long Integer
NewYear Long Integer
NewDate Date




Do an update query where you update Last2 to Right
([YouroldYear],2)

Update New Year to the correct Year with an 2c update
queries


Criteria of Last2 <4
Update New Year to Val("20"& [Last2]

2nd
Criteria of Last2 >3
Update New Year to Val("19"& [Last2]

Then update New Date using update query when New Date is
Left ([YourOldDate],6) & [NewYear]


You may need to play with the number 6 above to get it
right depending on your date format.


After your new date is correct, update your old date to
new date.


Get rid of all the extra fields
 
Back
Top