[CLOSED] JSON object property: convert to Date value

  1. #1

    [CLOSED] JSON object property: convert to Date value

    Hi

    In client side (javascript) I'm calling a webservice that return a vbobject serialized as Json format.

    One of property of object is a Date and is returned to me with this value...

    /Date(-62135546400000)/

    How I can convert this value to Date (javascript date) to set this value to a ext:DateInput???

    Thanks for any help!
    Last edited by Daniil; Jun 14, 2012 at 2:56 PM. Reason: [CLOSED]
  2. #2
    Setting .Format="MS" should parse the value correctly.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
  4. #4
    Hi,

    Please use Ext.Date.parse.
    http://docs.sencha.com/ext-js/4-1/#!...e-method-parse

    Example
    Ext.Date.parse("/Date(-62135546400000)/", "MS")
  5. #5
    Hi Daniil!

    Works very fine!

    Thanks a lot!

Similar Threads

  1. [CLOSED] Date is a string instead of Date object
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 01, 2012, 2:10 PM
  2. Replies: 0
    Last Post: Dec 01, 2011, 6:43 AM
  3. Replies: 4
    Last Post: Nov 08, 2010, 6:00 AM
  4. How to convert object in to Grid panel in javascripr
    By Satyanarayana murthy in forum 1.x Help
    Replies: 2
    Last Post: Dec 01, 2009, 12:13 AM
  5. How to convert a store to json string?
    By mcdonald in forum 1.x Help
    Replies: 2
    Last Post: Apr 13, 2009, 12:14 PM

Posting Permissions