Posted 8 September 2017, 1:37 pm EST
I have the following code assigning the formatting to a DateTime object on a bound query to the database. The default behavior is to show the Date time as MM/dd/yyyy. I am looking for millisecond resolution. I am using Spread 4.0 for forms. The docs indicate that the UserDefined format takes all the formatting of a .NET DateTimeFormatInfo object, which supports fff for fraction of a second. When I run the code, my dates and times are formatted correctly except the fff is not converted. It just shows "2009/11/14 00:00:00.fff". Any ideas on what I am doing incorrectly?
= new FarPoint.Win.Spread.CellType.DateTimeCellType();
dateTimeCellType.UserDefinedFormat = "yyyy/MM/dd HH:mm:ss:fff";
spdResults.ActiveSheet.Columns.CellType = dateTimeCellType;
spdResults.ActiveSheet.Columns.Width = 130;