[tpm] writting dateTime in DBI::CSV

Mark Fowle mfowle at navicominc.com
Fri Jul 24 11:55:05 PDT 2009


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.

 

Mark

 

 

________________________________

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

 

 

Let people know what you're up to, or share links to photos, videos, and
web pages.

<fulko.hew at gmail.com>

"Fulko Hew(w)" <fulko.hew at sita.aero>

"Fulko Hew" <fhew3 at cogeco.ca>

Ignore

Edit Word

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20090724/86389e8f/attachment-0001.html>


More information about the toronto-pm mailing list