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.34 -r1.35 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 13 Jan 2005 13:56:00 -0000 1.34 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 12 Mar 2005 21:39:59 -0000 1.35 @@ -289,7 +289,14 @@ } 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