PDA

View Full Version : Solved: Date problem



Saurabhk
12-05-2006, 03:25 PM
Hi Guys
I've got a bit of problem with date.
When I transfer data of a table to txt file the date column that appears in the table like "28/03/2001" changes to "28/3/2001 0:00:00" in the txt file. I've tried to change the format of date in the table but it doesn't help.I'm using the following code.



Private Sub Command2_Click()
DoCmd.TransferText acExportDelim, "PESALES Export Specification", "PESALES", "J:\Power Equipment\Common\SK\PESALES.TXT"
End Sub



Thanks for your time

OBP
12-06-2006, 08:30 AM
Saurabhk, what is the problem with the Date as shown, "28/3/2001 0:00:00" is the standard Date/Time format.

CORYWP
12-06-2006, 11:57 AM
Just do a quick replace in the text file of
" 0:00:00"
with
" "

should clean it right up. This is a simple solution if you are not doing this a lot.

Saurabhk
12-06-2006, 03:31 PM
Hi OBP,

I didn't know that was the standard format. I thaught that the date was changing format while data was being transferred to txt file.
As I was transfering this data back to the same table again and was getting an error message, I thaught that date column was causing the problem but now that doesn't seem to be the case.
Thanks for the help