1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    49
    Vote Rating
    0
    luisoswaldo is on a distinguished road

      0  

    Default Datefield format + mysql

    Datefield format + mysql


    hello friends,

    As you know, to keep a date in mysql this should have the format Y-m-d. I really want to show the date format d-m-Y. I wonder if anyone can tell me if there is any way to handle this with ext or should I convert the date to mysql format before saving accepts?.

    I appreciate any help you can offer.

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Location
    Argentina
    Posts
    36
    Vote Rating
    0
    gustavo21 is on a distinguished road

      0  

    Default


    Try this:

    PHP Code:
     {
             
    xtype'datefield',
             
    id'fecha1',
             
    format'd/m/Y',
             
    allowBlankfalse,
             
    blankText'Requerido'
             
    }, 

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    49
    Vote Rating
    0
    luisoswaldo is on a distinguished road

      0  

    Default


    Thanks for responding.

    The problem is that if I use the format d-m-Y will not store well in the mysql database.

    To save mysql must be in Y-m-d format. And I need the date is displayed to the user in the format d-m-Y.

    Any idea?

  4. #4
    Sencha User
    Join Date
    Dec 2009
    Posts
    364
    Vote Rating
    2
    raj_plays is on a distinguished road

      0  

    Default


    You can format the date before inserting in DB.
    MYSQL code
    Date_Format('01-08-2011', '%Y-%m-%d');

  5. #5
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default


    Send date in timestamp format instead of dealing with format.
    --
    Mehmet Çadırcı

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi