Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Export changes data 1

Status
Not open for further replies.

bravo6

IS-IT--Management
Mar 23, 2006
83
US
I'm trying to export a file per a custmomer spec. In the Access export wizard the file (Text- comma delimited)looks fine. But when I open the .txt file it has changed. Specifically this is the desired format and what it looks like in the wizard:

field,field,01/14/2007,01/16/2007,field,field,etc,.

When I open the exported file it has added a time behind the date and now looks like this:

field,field,01/14/2007 0000,01/16/2007 0000,field,field,etc.

Is there anyway to keep those zeros from showing up in my .txt file?
 
You can export a query with formatted dates.
 
I've tried that. The format still converts from
"mm/dd/yyyy" to "mm/dd/yyyy 0000" when exported
 
Which version of Access are you using? This SQL:

[tt]SELECT Table1.ID, Format([DMY],"mm/dd/yyyy") AS Expr1
FROM Table1[/tt]

Exported as text/csv, results in:

[tt]1,"01/05/2008"
3,"01/07/2008"
4,"01/08/2008"[/tt]

Using Access 2000.
 
I use Access 2003 but your answer is esentially what I have. Trying your suggestion this still adds in the time
 
Thanks, This revealed the real source of the problem. I had to create a new export specification to get this done. Nothing in the spec was wrong but was somehow corrupted. Trying the test table revealed where the problem was.
 




I would export in the UNAMBIGUOUS date format of yyyy/mm/dd, unless you have a different specification in your requirements.

Keep in mind that your export will be TEXT.

Most programs that IMPORT this data will CONVERT the TEXT representation of dates to a NUMBER that can be use in calculations and colation.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top