RecordField Type =" Date" DateFormat =" Y/m/d" display data

  1. #1

    RecordField Type =" Date" DateFormat =" Y/m/d" display data

    <ext:RecordField Name="StatTime" Type="Date" DateFormat =" Y/m/d"/>
    ,In GridPanel this column does not display data.
    But removed the DateFormat ="Y/m/d" normal.
    Give me a hand! Thank you.
    Last edited by Daniil; Dec 16, 2011 at 4:18 PM. Reason: Please use [CODE] tags
  2. #2
    Hi,

    Please use DateFormat if you bind a string to that RecordField. It will try to parse that string to get a date object.

    If you bind a DateTime object to that RecordField, you don't need to set up DateFormat.

    To display a date in a required format please use an <ext:DateColumn> setting up a respective Format in .NET date format string.

    Example
    <ext:RecordField Name="dateField" Type="Date" />
    
    <ext:DateColumn Header="Date" DataIndex="dateField" Format="yyyy/MM/dd" />
  3. #3
    Thank you. Like EXTNET
  4. #4
    Quote Originally Posted by Daniil View Post
    Hi,

    Please use DateFormat if you bind a string to that RecordField. It will try to parse that string to get a date object.

    If you bind a DateTime object to that RecordField, you don't need to set up DateFormat.

    To display a date in a required format please use an <ext:DateColumn> setting up a respective Format in .NET date format string.

    Example
    <ext:RecordField Name="dateField" Type="Date" />
    
    <ext:DateColumn Header="Date" DataIndex="dateField" Format="yyyy/MM/dd" />
    hi

    im trying to display a date field in a DisplayField control in a form panel
    is there a way i can show the birthdate as "yyyy/MM/dd" the record datat type is datetime
  5. #5
    Hi @batchmm76,

    Please start a new forum thread. If you feel the threads are related, please feel free to cross link between the two ones.

Similar Threads

  1. Replies: 1
    Last Post: Jun 26, 2012, 11:29 AM
  2. [CLOSED] Default date format for Type="Date" RecordField
    By r_honey in forum 1.x Premium Help
    Replies: 12
    Last Post: May 29, 2012, 3:16 PM
  3. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  4. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  5. Replies: 2
    Last Post: Jun 26, 2011, 1:59 AM

Posting Permissions