jcalder
jcalder

Reputation: 11

Far Point Spread Unable to make column type "Date"

We are experiencing a problem due to the fact that we are unable to format a particular column as a date. When the information is configured "MM/DD/YYYY" we can format it as a date, but, when we format the information "MM/DD/YYYY hh:mm:ss AM/PM" we are then unable to format the column as a date. We receive an error when we attempt to do so. We want the information to be formatted as a date so that the sort function sorts like a date instead of like a string.

For example, when the column is formatted as a date "12/31/2014" is seen to come before "01/01/2015". When the column is sorted as a string "01/01/2015" is seen to come before "12/31/2014".

Does anyone have any idea if we might be able to resolve this problem?

Thank you very much...

Upvotes: 0

Views: 759

Answers (1)

Warren Rox
Warren Rox

Reputation: 645

The Far Point Spread COM control has a Date type column. It sounds like you are configuring the date type via code. In code you would set the .Col and .Row of the spread control and then set the type to "CellTypeDate." This is a constant from FPUSpreadADO.CellTypeConstants. You could also set a block range of cells to this cell type.

However, a Far Point date type does not have time resolution. If you open up the property sheet for the control in the designer you will see the drop down options provide format options such as MM/DD/YYYY only.

I would suggest you use a combination of the Date and Time column times in the grid. The cell type is constant "CellTypeTime."

Upvotes: 0

Related Questions