[tpm] writting dateTime in DBI::CSV

Fulko Hew fulko.hew at gmail.com
Fri Jul 24 12:07:44 PDT 2009


On Fri, Jul 24, 2009 at 2:55 PM, Mark Fowle <mfowle at navicominc.com> wrote:
>
> CSV files are not always comma separated. The DBD::CSV engine can
> have different field and record separators.
>
> From the man page it seems “:” is a common, if not default field separator,
> if that is the case your input would need quoting/escaping to encapsulate
> the “:” in the record.
>
> You can adjust the various separators and escape character to control quoting.

Thanks for the lead... it turns out that I had to 'connect' to the
database using an option

csv_sep_char=:;
csv_quote_char=;
csv_escape_char=

The 'magic' one was the csv_quote_char which I set to 'no character'
and that made the format right.


> From: toronto-pm-bounces+mfowle=navicominc.com at pm.org [mailto:toronto-pm-bounces+mfowle=navicominc.com at pm.org] On Behalf Of Fulko Hew
> Sent: Friday, July 24, 2009 2:41 PM
> To: TPM
> Subject: [tpm] writting dateTime in DBI::CSV
>
>
>
> Can anyone tell me how to store a 'date/time' in a DBI::CSV file?
>
> ie.    01-MAY-2009 00:00:00
>
> Because... if I use something like:
>
> $dateTime = "01-MAY-2009 00:00:00";
> INSERT INTO table (DATE) values (  '$dateTime' )
>
> then what's written is a quoted dateTime string:
>
>   "01-MAY-2009 00:00:00"
>
> not the value itself:
>
>   01-MAY-2009 00:00:00


More information about the toronto-pm mailing list