I have a spring MVC java application and I’m serializing joda DateTime to json.
When I examine the output through the browser the DateTime serialized data looks like this:
startDate: 1323147660000
I’m not sure which format this data is in. I’ve tried many different combinations of srcformat and newformat format options including the following based on this post:
{srcformat:'U', newformat:'m/d/Y'}
My hunch is that this is the number of milliseconds since the epoch but I’m not sure how to use it correctly within jqgrid.
Thanks in advance for any help.
Actually the milliseconds from epoch format was supported out-of-the-box in one of the previous versions of jqGrid. Unfortunately it has been dropped for an unknown reason.
Here is a workaround:
Note that with custom
formatteryou can parse the date and format it in any way you wish. However I did my best to use built-in jqGrid formatting facilities (see theUniversalSortableDateTime?)