DIAdem API Reference

Command: ConvertTimeType

  • Updated2023-02-21
  • 2 minute(s) read

Display all  Hide all

Converts a time data type to another time data type.

ReturnValue = ConvertTimeType(SourceDateTime, TargetType)

Input Parameters

SourceDateTime Specifies the time to convert. DIAdem automatically specifies the data type of the time to be converted. It can be the same data type as one of the data types specified in TargetType. Use the ApplicationTimebaseHighResolution variable to resolve DIAdem time data.
TargetType Specifies the data type of the returned time value.

Return Parameters

ReturnValue The return value is a Variant variable type. The data type corresponds to the data type specified in TargetType.

Examples

The following example generates a channel with time values. The command CreateTime generates a start time for the time channel with 10 time values and a step width of 1 week.

VBScriptPython

 

Dim Range, dStartTime, oStartTime, vStartTime
Range = "week"
Set oStartTime = CreateTime(1999,11,20,0,0,0)
dStartTime = ConvertTimeType (oStartTime,eConvertDIAdemDateTime )
Call ChnGenTime ("[]/GenTimeChn_dTime", Range, dStartTime, 0, 1, "StartStepNo", 10)

Related Functions

Command: ChnConvertNumericToTime | Command: ChnConvertTimeToNumeric | Command: TTD | Function: RTP (Real To Part of Date) | Function: RTT (Real to Text) | Function: TTR (Text to Real)