export date data to text file

I

Ivan

Use a query containing all the fields you need to export
but include the date field embedded in a formula of the
type 'format([Datefield],"mm/dd/yyyy")' this display the
date stripped of the time.
 
T

tracey

I did try that and it becomes text as in qoutes are placed
around it when exported to a comma delimeted text file.
Date data types do not have the quotes around them when
exported. Thanks you for your suggestion!
-----Original Message-----
Use a query containing all the fields you need to export
but include the date field embedded in a formula of the
type 'format([Datefield],"mm/dd/yyyy")' this display the
date stripped of the time.
-----Original Message-----
I am exporting data to a text file that is then sent to
another company for use. The date data is exported as:
mm/dd/yyyy 0:00:00. I need to get rid of the "0:00:00".
I cannot figure out how remove it and the data remain as a
date data type. I was able to remove it however then it
shows as text: "mm/dd/yyyy". In other words I need to have
mm/dd/yyyy with no quotes arround it. Any suggestions?
..


.
.
 
J

John Nurick

Hi Tracey,

Having quotes around the values in the data fields is only a problem if
the software you're subsequently importing the file into makes it a
problem. In my experience, programs that can import CSV files usually
don't care whether the delimiters around date values are there or not.

If you're stuck with one of the exceptions, modify your query so it adds
quotes before and after any text data, using calculated fields like
this:
fTextField: Chr(34) & [TextField] & Chr(34)
Then export it with comma separators and no text qualifiers.



I did try that and it becomes text as in qoutes are placed
around it when exported to a comma delimeted text file.
Date data types do not have the quotes around them when
exported. Thanks you for your suggestion!
-----Original Message-----
Use a query containing all the fields you need to export
but include the date field embedded in a formula of the
type 'format([Datefield],"mm/dd/yyyy")' this display the
date stripped of the time.
-----Original Message-----
I am exporting data to a text file that is then sent to
another company for use. The date data is exported as:
mm/dd/yyyy 0:00:00. I need to get rid of the "0:00:00".
I cannot figure out how remove it and the data remain as a
date data type. I was able to remove it however then it
shows as text: "mm/dd/yyyy". In other words I need to have
mm/dd/yyyy with no quotes arround it. Any suggestions?

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top