HELP with exporting table to txt file?

  • Thread starter Thread starter Jacqueline
  • Start date Start date
J

Jacqueline

I have an Access 97 table that has to be exported to a txt
file...

The birthdate field must be exported as a number
field...with 8 digits (2 for day - 2 for month - 2 for
year)...it is currently saved in the table as a date/time
field...format mm/dd/yyyy.

I know I can format it in a query to change it to
ddmmyy...but I also need to change it then to a number
field...can you just change the type from date/time to
number...or is there another step to perform??
 
Hello Jacqueline,

You can change the data type of your date field in your query to a number by
using the following expression:

CLng(Format([OrderDate],"ddmmyyyy"))

However, if the day of the month is 01 through 09, converting your date
field to a number will strip off the leading zero. For example:

Date: September 1, 2002 will convert to numeric as: 1092002 (not
01092002)


Are you creating your export file to meet some pre-defined specifications?
You might want to consider a Fixed Width export, or if you are absolutely
certain that there are no commas anywhere in your exported data fields, you
could (in the Export Wizard) create a Delimited format changing the Text
Delimiter property to None. If your data does contain commas, you could
change the Field Delimiter from a comma to a Pipe | (also using the
Export Wizard).

Post back and let us know.
 
Back
Top