Replied 8 September 2017, 1:49 pm EST

Hello,

Following are the parameters of the TIME function along with their description.

hour Hour as a number from 0 to 23.

minutes Minutes as a number from 0 to 59.

seconds Seconds as a number from 0 to 59.

You may try the below snippet to get the desired result:

Dim dt As New FarPoint.Win.Spread.CellType.DateTimeCellType

dt.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.TimeOnly

FpSpread1.ActiveSheet.Cells(1, 1).Formula = "TIME(2,0,0)

FpSpread1.ActiveSheet.Cells(1, 1).CellType = dt

And if you want to show 2PM in the cell, then replace the hour parameter of TIME formula with 14 in cell(1,1) .Thanks