[AccessD] Export to CSV file problem

Perry Harold pharold at proftesting.com
Tue Oct 26 09:04:14 CDT 2004


What happens when you have MM/DD/YYYY?  That's 10 char.  The catch is when
it's M/M/YYYY because the time starts at position 10 and you pick up an
extra digit.  

Any dates over 10/9, 11/9 and 12/9 loose the last char of the year when you
use a size of 9.

If you export with code then you could search the field for a space and pick
up just the date portion of the field.

Perry Harold

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester A
Sent: Tuesday, October 26, 2004 8:20 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Export to CSV file problem


The field in the table is text. I tried date/time and both the date and the
time displayed in the table. The export is dome by the transfertext method.
The reason I used the word date is because the csv file generated is loaded
into another program where the field names need to match and the field name
in that program is date. I solved the problem by making the date field nine
characters. Maybe not the best way but it chops of the time part of
date/time and shows only the date in the csv file.

Chester Kaup
Information Management Technician
IT-MidContinent/MidContinent Business Unit
CTN 8-687-7415  
Outside 432-687-7415

No trees were killed in the sending of this message. However a large number
of electrons were terribly inconvenienced. 




-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Monday, October 25, 2004 5:24 PM
To: Access Developers discussion and problem solving 
Subject: Re: [AccessD] Export to CSV file problem


On 25 Oct 2004 at 16:47, Kaup, Chester A wrote:

> I have the following field in a query that makes a table.
> Date: Format((CDate(Forms![frm Select Date]!selected_date)),"Short
> Date")
> When I open up the table I see a short date
> When I export the table to a csv type file I get both the date and the

> time. How do I get only the date into the csv file?
> 

Is the field in the table defined as String or Date/Time? (I just tried 
this in A2K and in my case it did end up as a String)

How are you doing the Export?

Incudentally, it is not good practice to use "Date" as a field name since 
it is a reserved word with a specific meaining in Access. It can bite you 
in all sorts of ways.

-- 
Stuart


-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list