Hi, Chutney.
> Does anyone know if/how I can import this format?
Yes.
> However, I am interested to know if it
> is possible to get the date to import correctly in one move.
Format the date string so that Jet can recognize it as a date. The
following example works without a schema.ini file to guide the formatting,
so YMMV if you have a schema.ini file in the same directory:
INSERT INTO tblTextImport ( FName, LName, Address, DOB )
SELECT FName, LName, Address,
(MID(DOB, 1, 2) & " " & MID(DOB, 3, 3) & " " & MID(DOB,6, 2)) AS Temp
FROM [TEXT;DATABASE=C:\Test\].TextImport.txt;
.. . . where DOB in the table is a Date/Time data type, DOB in the text file
is a text field of format ddmmmyy, C:\Test\TextImport.txt is the path and
file name of the text file, and tblTextImport is the name of the table to
import the data into.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
"Chutney via AccessMonster.com" <u14792@uwe> wrote in message
news:5f6bd8b403666@uwe...
>I am importing a text file that has dates in the format 15MAR06. I have the
> following in my schema.ini file but the dates are not imported into the
> date
> field in the table:
> DateTimeFormat = "ddmmmyy"
> I have used this successfully to import other date formats (e.g.
> "dd/mm/yyyy")
> . Does anyone know if/how I can import this format? I am importing to a
> staging table so I can import the date to a text field and then use a
> formula
> to move the date to the master table. However, I am interested to know if
> it
> is possible to get the date to import correctly in one move.
>
> Thanks and regards.
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200604/1