Results 1 to 2 of 2

Thread: DateField format

  1. #1
    Sencha User
    Join Date
    Sep 2017
    Posts
    20
    Answers
    3

    Default Answered: DateField format

    Hey guys I have a problem,

    I have a datecolumn with a datefield i want to send to the server, the code is

    Code:
    xtype: 'gridpanel',
                height: 300,
                id: 'grdRegistro',
                maxHeight: 300,
                store: 'ingreso.IngresoStore',
                listeners: {
                    rowclick: 'onGrdRegistroRowClick'
                },
                columns: [
                    
                    {
                        xtype: 'datecolumn',
                        width: 108,
                        dataIndex: 'ENFECHAE',
                        text: 'Entrega',
                        format: 'Y-m-d',
                        editor: {
                            xtype: 'datefield',
                            format: 'Y-m-d',
                            submitFormat: 'Y-m-d'
                        }
                    },
    I tried to put Y-m-d in all the format config I found, but when I send the information I got the error:

    Code:
    [Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting character string to smalldatetime data type.
    UPDATE "INGRESO" SET "ENFECHAE" = 'Tue Sep 05 2017 00:00:00 GMT-0500 (Hora est. Pacífico, Sudamérica)' WHERE "counidad" = '015' AND "eningres" = 7
    Ignore the Where clause

    The datefield is sending the wrong format to the server

    "Tue Sep 05 2017 00:00:00 GMT-0500 (Hora est. Pacífico, Sudamérica)"

    Where do I change the format that is sent to the server???

    Thx

  2. I found the answer, looks like in my model the field was set as string, not date

    Thx anyways!

  3. #2
    Sencha User
    Join Date
    Sep 2017
    Posts
    20
    Answers
    3

    Default

    I found the answer, looks like in my model the field was set as string, not date

    Thx anyways!

Similar Threads

  1. Replies: 0
    Last Post: 14 Mar 2017, 12:46 AM
  2. DateField Format
    By jagadesh in forum Ext GWT: Help & Discussion (1.x)
    Replies: 5
    Last Post: 30 Sep 2014, 10:25 PM
  3. datefield format
    By tomlobato in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 13 May 2009, 6:47 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •