GefTextFormat.SetFormatToTimeRelative (method)

Sets the format to be used for the TextExpression display.
Syntax: Boolean = object.SetFormatToTimeRelative ( TimeFormat )
Parameters:
Optional TimeFormat As GefTimeFormatEnum -
Description: The SetFormatToTimeRelative method sets the display format to display the value as time. The parameters correspond to the fields in the Text property page.

Example:

Sub GefTextFormat_SetFormatToTimeRelative()
    
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        oCimTxtFmt.TextExpression = "$Project.DateTime"
        CimGetScreen.Refresh False
        If oCimTxtFmt.SetFormatToTimeRelative(gefTimeHH_MM_SS) = True Then
            CimGetScreen.Refresh False
            MsgBox "The value is now being displayed as relative time"
        End If
    Else
        MsgBox "The object does not have any text to format"
    End If
    
End Sub