Index: openacs-4/packages/acs-templating/tcl/date-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/date-procs.tcl,v diff -u -r1.35.2.1 -r1.35.2.2 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 23 Jun 2005 12:39:45 -0000 1.35.2.1 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 23 Jun 2005 14:44:42 -0000 1.35.2.2 @@ -289,7 +289,13 @@ } set pad "00" } - return "to_date('$value', '$format')" + # DRB: We need to differentiate between date and timestamp, for PG, at least, + # and since Oracle supports to_timestamp() we'll just do it for both DBs. + if { [llength $date] <= 3 } { + return "to_date('$value', '$format')" + } else { + return "to_timestamp('$value', '$format')" + } } ansi { # LARS: Empty date results in NULL value