use DBI qw(:sql_types); # make sure DBI gives you access to sql_types strings $Array[0] = undef; $sth = $dbh->prepare("INSERT into MYTABLE (mydate) VALUES(?)"); $sth->bind_param( 1, $Array[0], SQL_DATETIME ); # forces the data type $sth->execute; # no args needed here now.