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
60
PivotGrid and DateTime Fields
posted

Hi,

  First of all sorry if I posted in the wrong newsgroup. I amtrying to use the Pivot Grid for the first time. I am populating a Datatable from my database and on of the fields is a DateTime. I then add the field to the Pivot grid using the code below

 PivotGridField myField = new PivotGridField("FlightDate", PivotArea.FilterArea);

myField.Caption = FieldTitle;

pivotGridControl1.Fields.Add(myField);

This works but the Field comes out as '12-31-2010 00:00:00' but i need to format the date to UK format with no time 'dd/MM/yyyy'. I tried to use the code below but with no luck

myField.CellFormat.FormatType = FormatType.DateTime

myField.CellFormat.FormatString = "d";

 

Am i doing something wrong or the date cannot be formatted

Parents
  • 469350
    Offline posted

    Hi

    There is no PivotGrid in the Windows Forms product line. So I think you are posting in the wrong forum.

    I'd be happy to move your post to the appropriate forum, but I'm not sure which one that is.

    What programming environment are you working in? WPF? Silverlight? ASP.Net?

Reply Children