开发者

how to build sql server 2008 datetime object and insert it using perl DBI

How can i build a sql server 2008 date开发者_如何学Pythontime object with perl and insert it using the dbi module to specific table could someone provide example


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜