From 8cf086398fc976b229e126e83e2209c20ce9f6be Mon Sep 17 00:00:00 2001 From: Daniel Rios <dr2@sanger.ac.uk> Date: Fri, 28 Apr 2006 09:48:52 +0000 Subject: [PATCH] Modified method sconds_to_date and date_to seconds with the appropriate methods in MSSQL --- modules/Bio/EnsEMBL/DBSQL/DBConnection.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm b/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm index 52046a232d..89db0a0fad 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm @@ -718,10 +718,12 @@ sub from_seconds_to_date{ } elsif ($self->driver eq 'odbc'){ if ($seconds){ - $string = "DATEDIFF(date,'JAN 1 1970',$seconds)"; + $string = "DATEADD(second,$seconds,date)"; +# $string = "DATEDIFF(date,'JAN 1 1970',$seconds)"; } else{ - $string = "\"0000-00-00 00:00:00\""; +# $string = "\"0000-00-00 00:00:00\""; + $string = 'January 1, 1900'; } } else{ -- GitLab