在postgres数据库中插入日期
答
只是格式化日期作为字符串,并将其传递给SQL查询
$date = sprintf("%04d-%02d-%02d",$year,$month,%day)
答
尝试PHP的date()方法,然后与可能相结合的strtotime()转换为正确的格式。
+1
难道你不在乎提供一些示例代码? thnks。 – nunos 2011-04-18 18:11:44
仅供参考 - [可识别日期格式列表](http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-DATE-TABLE)。 – 2011-04-19 08:45:01