Property: TimeFormat for CellFormatter
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Properties > Property: TimeFormat for CellFormatter
Property: TimeFormat for CellFormatter
Specifies the time format used in the workbook.
Object.TimeFormat
Object | CellFormatter Object with this property |
Object.TimeFormat | String with read and write access |
Use the following format specifications for the time format:
Y | Year |
M | Month |
D | Day |
h | Hour |
m | Minute |
s | Second |
f | Fraction of a second |
pp | Identifies am / pm |
The following example shows the settings required for reading the lines listed below from a workbook:
2004-06-28 16:28:20; 29,8¶ 2004-06-28 16:28:21; 36,4¶ 2004-06-28 16:28:22; 44,1¶ 2004-06-28 16:28:23; 53,9¶ 2004-06-28 16:28:24; 68,4¶
The TimeFormat property specifies the time format valid for the first channel.
Dim oGroup: Set oGroup = Root.ChannelGroups.Add("MyChannelGroup") Workbook.Formatter.TimeFormat = "YYYY-MM-DD hh:mm:ss" Dim oBlock: Set oBlock = Workbook.Sheets(1).GetCellBlock(1,1) Dim oChannel Set oChannel= oBlock.Channels.Add("Channel",eTime) Call oGroup.Channels.AddDirectAccessChannel(oChannel) Set oChannel= oBlock.Channels.Add("Channel") Call oGroup.Channels.AddDirectAccessChannel(oChannel)