在JCR中,我注意到日期的格式爲Feb 19, 2015 12:00:00 AM
。這意味着,當你嘗試按日期排序的查詢時,它似乎並沒有工作:玉蘭JCR-SQL2按日期排序
SELECT * FROM [mgnl:pages] ORDER BY articlePublishedDate
返回結果:
Apr 1, 2015 12:00:00 AM
Dec 1, 2015 12:00:00 AM
Feb 1, 2015 12:00:00 AM
有什麼辦法可以使ORDER BY
條款充當整數?我試過CAST(articlePublishedDate AS LONG)
,但它似乎我的內容存儲庫不喜歡它...