DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: TimeFormat for Formatter

Property: TimeFormat for Formatter

Specifies the format for the time values in the file.

Object.TimeFormat
ObjectFormatter
Object with this property
Object.TimeFormatString with read and write access

Use the following format specifications for the time format:

YYear
MMonth
DDay
hHour
mMinute
sSecond
fFraction of a second
ppIdentifies am / pm
Note  The year formatting automatically extends to 4 characters so that the specification YY becomes YYYY. When DIAdem reads in the data, the correct century precedes. The year 99 becomes 1999 and the year 05 becomes 2005. 
Note  Normally seconds and minutes are in the value range 0-59, hours in the value range 0-23, days in the value range 1-31, and months in the values range 1-12. If one of these values to be read exceeds its value range, the value is converted into the next value. For example, the time value 00:65:10 in the file becomes 01:05:10 and the time value 54:30:00 becomes 03.01.0000 06:10:00.

The following example shows the settings required for reading the lines listed below:

28.06.2004 16:28:20; 0.00123428.06.2004 16:28:21; 0.00239828.06.2004 16:28:22; 0.00129628.06.2004 16:28:23; 0.00162828.06.2004 16:28:24; 0.001683

The TimeFormat property specifies the time format to be read.

File.Formatter.TrimCharacters = " "
File.Formatter.LineFeeds  = vbNewLine
File.Formatter.Delimiters = ";"
File.Formatter.TimeFormat = "DD.MM.YYYY hh:mm:ss"
Dim oChn, oGrp
Set oGrp = Root.ChannelGroups.Add("MyChannelGroup")
Set oChn = oBlock.Channels.Add("Time",eTime)
Call oGrp.Channels.AddDirectAccessChannel(oChn)
Set oChn = oBlock.Channels.Add("YShift",eR64)
Call oGrp.Channels.AddDirectAccessChannel(oChn)

The following example shows the settings required for reading the lines listed below:

54:30:060:30:066:30:072:30:078:30:084:30:090:30:0

The TimeFormat property specifies the time format to be read.

File.Formatter.Delimiters = ";" 
File.Formatter.LineFeeds  = vbNewLine 
File.Formatter.TimeFormat = "hh:mm:ss"

Dim oBlock : Set oBlock = File.GetStringBlock() 
Dim oDAChn : Set oDAChn = oBlock.Channels.Add("FileData", eTime) 

Dim oGrp  : Set oGrp  = Root.ChannelGroups.Add("MyChannelGroup") 
Dim oIChn : Set oIChn = oGrp.Channels.AddImplicitChannel("ValueIndex", 1, 1, oDAChn.Size(), eI32) 
Call oGrp.Channels.AddDirectAccessChannel(oDAChn) 
In This Section
Was this information helpful?