【发布时间】:2014-03-16 04:59:43
【问题描述】:
我的 perl 脚本:
my $dbh = DBI->connect("DBI:Oracle:MIGSTG","AI","migrate") or die " can't connect to db";
$data = "select package_id,action,line_seq,status,entry_date from pack_pr_queue where package_id = :p1";
$sth = $dbh->prepare($data) or die " cannnot prepare the select";
$sth->bind_param( ":p1", $package );
$sth->execute() or die "cannot execute";
while (@row = $sth->fetchrow_array) {
print "@row";
将值 3687898 传递给 p1
我从脚本中得到这个输出
3687898 Planned Release 2 OPEN 20-MAY-13
但我从蟾蜍那里得到
3687898 Planned Release 2 OPEN 5/20/2013 3:40:36 AM
我想得到一个完整的日期和时间的输出(5/20/2013 3:40:36 AM)
请给我一个建议
【问题讨论】:
-
entry_date列的数据类型是什么?如果只是DATE,那你就不走运了,因为这不包括时间。