1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    36
    Vote Rating
    0
    PabloPerezAdsuar is on a distinguished road

      0  

    Default Answered: Saved datetime values in distinct format automatically

    Answered: Saved datetime values in distinct format automatically


    Hello, I am developing a app and I using datepicker components.

    My problem is to save the value of the datetime in the database, is saved in format "Fri Apr 05 2013 00:00:00 GMT+0200 (Hora de verano romance)", but I want to save it in format "2013-04-21 12:12:00".

    Is there any way to do this automatically?

    Thank you!


    Now..
    fechaIncorrecta.png


    I want..
    fechaCorrecta.png

  2. You are using a writer on a store and syncing the store? It should send the same format as the dateFormat config in your model field.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You are using a writer on a store and syncing the store? It should send the same format as the dateFormat config in your model field.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    36
    Vote Rating
    0
    PabloPerezAdsuar is on a distinguished road

      0  

    Default


    Perfect, now works fine too

Thread Participants: 1

Tags for this Thread