Filed under: xn--cnq77f.com
There is a date in my Xml store.
{name: 'birthDay', type: 'date', dateFormat: 'Y-m-d'}
In my xml data ,the date is '2007-12-20T00: 00: 00', but with above set, I can not get the desire result ---'2007-12-20', there is null in display. Why?When you read the date value into the data store like you're doing there you need to set the format as the format that the string is in, not the format that you want it to be when it comes out. I'm not to sure about the 'T' thats in the date string that you're passing there, but you can use the examples in the date section of the docs to see what formats are available. Set up the 'dateFormat' that you've got there to match what you're sending to it so it can create a proper date object, and then you can use formatting to get whatever format you want from it later.i dont see how the date can be parsed correctly if you arent providing a dateFormat that matches it.#If you have any other info about this subject , Please add it free.# |
|
edit