Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
855
NA 2008 Vol. 1: DateTime Display in Grid
posted

I'm using NA 2008 Vol 1 UltraWebGrid with ASP.NET 2.0 on Windows XP. In my SQL Server database I have a table with a DateTime field.
In IE6 my date is displayed as "2008-08-25". In IE7 my date is displayed as "2008-08-25 0:00:00". I do not enforce a date format on the column. I would like to have the date format the same for both IE6 and IE7 and in the format "2008-08-25". Is this a UltraWebGrid issue or an IE issue?

  • 7694
    posted

      Normal 0 21 false false false BG X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

    Hello,

    You can use the property Format="dd.MM.yyyy" Please take a look at the code below

    <Bands>

    <igtbl:UltraGridBand>

    <Columns>

    <igtbl:UltraGridColumn BaseColumnName="OrderDate" DataType="System.DateTime" Format="dd.MM.yyyy" IsBound="True" Key="OrderDate">

    <Header Caption="OrderDate">

    </Header>

    </igtbl:UltraGridColumn>

    Hope this helps.