473,327 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 4857
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear"...
2
by: Kenneth | last post by:
How do I remove the limitation in Access that deny me from exporting 24000 rows and 17 columns (in a query) into Excel? Kenneth
0
by: Otis Hunter | last post by:
I have been fighting with this for days and your expert help is needed! Below is the code I am executing which results with "Object doesn't support this property or method". The error is occuring...
1
by: Big Time | last post by:
I'm exporting a large amount of data from one of my tables into a tab delimited text file. The problem is the fields that have date format come out in MM/DD/YY HH:MM:SS format when what I want is...
6
by: Kevin Chambers | last post by:
Hi all-- In an attempt to commit an Access MDB to a versioning system (subversion), I'm trying to figure out how to convert a jet table's metadata to text, a la SaveAsText. The end goal is to...
0
by: Kosmos | last post by:
Okay so the following is a question I posted earlier...to clarify what I'm trying to do here...I simply want the printed output to be put into a new field in a different table that's already created...
6
by: sara | last post by:
I have what I think is a little strange...I have to get data from our payroll system into a specific format (fixed record length) as a .txt or .prn file only to upload to our 401k custodian. I...
16
by: pmatzek | last post by:
I am attempting to automate a process involving importing a .txt file into an existing table, changing a date in each record, then exporting the table, again as a .txt file. One field contains a...
1
by: AccessHunter | last post by:
Hi, I have a Make Table query that has the Date field as follows, Date: IIf(IsNull(),"",DateValue((IIf(IsNull(),"",Format(,"mm/dd/yyyy"))))). Query run fine and creates the table, but when I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.