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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Function Date Format

Status
Not open for further replies.

BAWC01

Technical User
Nov 23, 2005
79
CH
Hi

I'm exporting a query to a file using

Code:
     DoCmd.TransferText acExportDelim, "Export_AP INV DISTR", "AP INV DISTR", GlobalOUTPUTLoc & "\" & "AP INV DISTR.csv", True

This works fine expect when I look at the file

Code:
Supplier	Description	Inv Date	Inv Number	Net
100171	travel	08/12/2005 00:00	NOV.05 EXP179	120.04
100264	btb	08/12/2005 00:00	TT178	42.55
100264	Expenses nov3	08/12/2005 00:00	BBCNANOV3156	68.09
100264	Export Test 2	08/12/2005 00:00	BTBCNATEST2173	145.8
100264	November expenses 3	08/12/2005 00:00	BBCNANOV3171	72.34

The INV_DATE has 00:00 after the date !!! I just want the date, there is nothing in the Export Wizard that I can see that will get rid of it.

Phil

 
Modify the query

Inv Date: Format([Inv Date],"dd/mm/yyyy")

to format the Invoice date as required.

HTH

Mark...
 
Hi

I have done this but I still get it ?

Phil
 

And this field Inv Date in your table is a Date/Time field?
 
I have the same problem. Trying to export to a tab delimited (no text delimiters) .txt file. In a query, have tried...

MyDate: Format([DateField],"mm/dd/yy")
MyDate: CStr(Format([DateField],"mm/dd/yy"))
MyDate: CStr(Format([DateField],"mm/dd/yy")&" ")

No matter what, It always comes out in the text file as:
2/22/06 0:00:00

The KB says to do what I did in the first case above, but it doesn't work. Any help would be greatly appreciated.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top