How can i build a sql server 2008 datetime object with perl and insert it using the dbi module to specific table could someone provide example
views:
39answers:
1
+1
A:
If using ODBC:
my $sth = $dbh->do(q/insert into mytable (mydatetimecol) values(?)/;
$sth->execute(q/{ts 'yyyy-mm-dd hh:mm:ss'}/);
The datetime can also have '.mmm' on the end for milliseconds.
If not using ODBC it will depend on what DBD you are using.
bohica
2010-06-15 12:53:15