Commit 8cf08639 authored by Daniel Rios's avatar Daniel Rios
Browse files

Modified method sconds_to_date and date_to seconds with the appropriate methods in MSSQL

parent 9126664f
...@@ -718,10 +718,12 @@ sub from_seconds_to_date{ ...@@ -718,10 +718,12 @@ sub from_seconds_to_date{
} }
elsif ($self->driver eq 'odbc'){ elsif ($self->driver eq 'odbc'){
if ($seconds){ if ($seconds){
$string = "DATEDIFF(date,'JAN 1 1970',$seconds)"; $string = "DATEADD(second,$seconds,date)";
# $string = "DATEDIFF(date,'JAN 1 1970',$seconds)";
} }
else{ else{
$string = "\"0000-00-00 00:00:00\""; # $string = "\"0000-00-00 00:00:00\"";
$string = 'January 1, 1900';
} }
} }
else{ else{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment