日期格式有问题,我有以下代码:
但是我在 Play 2.1-RC3 中得到 [IllegalArgumentException: Cannot format given Object as a Date]
def formatDate(indate: Date) : String = {
val dateFormat = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss")
val datedate = dateFormat.format(indate)
datedate
}
val fdate = Extrastuff.formatDate("2012-10-08 15:16:56.0")