我有这种格式的日期:

   24-12-2010 // DAY - MONTH - YEAR

我需要以这种格式得到它:

   1995-12-31T23:59:59.999Z // The Z is for the TimeZone I think.

检查此链接:

http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html

以上链接是我需要日期的方式.

我现在正在使用PHP,所以这需要使用PHP.
如何以最简单的方式转换这些日期?

谢谢

最佳答案
这是ISO8601格式的日期;以下是你想要的.

gmdate('Y-m-d\TH:i:s\Z',strtotime($date_value));

dawei