469,643 Members | 2,061 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Exporting Date Field

I have a process that exports an Access table to a comma-delimited
text file. One of the fields that is exported shows the date it was
exported, using the Date() function. In the Access table, the date
appears in the records in mm/dd/yyyy format, but after exporting, the
date appears as mm/dd/yyyy 0:00:00. For example, today is 11/06/2003.
It shows 11/06/03 in the Access table, but the exported text file
shows 11/6/03 0:00:00. I thought maybe the Date() field had to be
specifically changed to Short Date format, but this did not solve my
problem. Because of the added 0:00:00, any fields following this date
field are not being recognized when that text file is input into a
second, larger FoxPro database. Any help is greatly appreciated.

Fran Zablocki
Nov 12 '05 #1
3 4631
"Fran Zablocki" <fe*@buffalo.edu> wrote in message
news:66**************************@posting.google.c om...
I have a process that exports an Access table to a comma-delimited
text file. One of the fields that is exported shows the date it was
exported, using the Date() function. In the Access table, the date
appears in the records in mm/dd/yyyy format, but after exporting, the
date appears as mm/dd/yyyy 0:00:00. For example, today is 11/06/2003.
It shows 11/06/03 in the Access table, but the exported text file
shows 11/6/03 0:00:00. I thought maybe the Date() field had to be
specifically changed to Short Date format, but this did not solve my
problem. Because of the added 0:00:00, any fields following this date
field are not being recognized when that text file is input into a
second, larger FoxPro database. Any help is greatly appreciated.


Don't export the table. Create a query based on the table and export that.
In the query you can replace the Date field with an expression using the
Format() function. This will return a string version of the date with the
formatting you specify and this will be exported to the text file as
desired.

FormattedDate: Format([YourDateField], "mm/dd/yyyy")
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #2
You could create a query based on this table and in the date field use the
format function thus:

Format([MyField],"mm/dd/yyyy")

which will return a text string in the format you want.

P
"Fran Zablocki" <fe*@buffalo.edu> wrote in message
news:66**************************@posting.google.c om...
I have a process that exports an Access table to a comma-delimited
text file. One of the fields that is exported shows the date it was
exported, using the Date() function. In the Access table, the date
appears in the records in mm/dd/yyyy format, but after exporting, the
date appears as mm/dd/yyyy 0:00:00. For example, today is 11/06/2003.
It shows 11/06/03 in the Access table, but the exported text file
shows 11/6/03 0:00:00. I thought maybe the Date() field had to be
specifically changed to Short Date format, but this did not solve my
problem. Because of the added 0:00:00, any fields following this date
field are not being recognized when that text file is input into a
second, larger FoxPro database. Any help is greatly appreciated.

Fran Zablocki

Nov 12 '05 #3
Thanks to both of you for the quick response, it works great.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Big Time | last post: by
6 posts views Thread by Kevin Chambers | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.