Hello,
I have an sql server 2008 r2 time(0) data type field with format (hh:mm:ss) to a radgrid and i would like to export it to an excel file.
I use this code:
but i can't see the time data at my excel file. Where is the error;
P.S.
The LongTime member of NumberFormatType enumerator is not suitable for my case, because my data are in hh:mm:ss format and not in hh:mm:ss:ff.
Thank you very much.
I have an sql server 2008 r2 time(0) data type field with format (hh:mm:ss) to a radgrid and i would like to export it to an excel file.
I use this code:
StyleElement timeStyle = new StyleElement("timeItemStyle");timeStyle.NumberFormat.Attributes["ss:Format"] = "hh:mm:ss";//timeStyle.NumberFormat.FormatType = NumberFormatType.LongTime;timeStyle.FontStyle.Color = System.Drawing.Color.Red;e.Styles.Add(timeStyle);StyleElement alternatingTimeStyle = new StyleElement("alternatingTimeItemStyle");alternatingTimeStyle.NumberFormat.Attributes["ss:Format"] = "hh:mm:ss";//timeStyle.NumberFormat.FormatType = NumberFormatType.LongTime;alternatingTimeStyle.FontStyle.Color = System.Drawing.Color.Red;e.Styles.Add(alternatingTimeStyle);but i can't see the time data at my excel file. Where is the error;
P.S.
The LongTime member of NumberFormatType enumerator is not suitable for my case, because my data are in hh:mm:ss format and not in hh:mm:ss:ff.
Thank you very much.