TCA.Split

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Date and Time Calculation > TCA. - Time Calculation >

TCA.Split

TCA. Split Timestamp into Parts

Previous Top Next


MiniRobotLanguage (MRL)

 

TCA.Split - Command

Split Timestamp into its Components

 

 

Intention

 

Using TCA.Split you can easily split a Timestamp in all Components:

 

HH:MM:SS.ddd

 

Hereby the

- HH is Hours (0 to 99 - not limited to 12 or 24)

- MM is the Minutes limited 59

- SS is the Seconds limited 59

- ddd is the Milliseconds limited to 999

 

The Format of the Milliseconds is internally rounded to 3 places by prefixing zeroes.

If you specify 00:00:23 this will be treated as 00:00:00.023

If you specify 00:00:00.023 this will be treated as 00:00:00.023

 

 

Sample: Split (Split Timestamps)

 

$$LAA=01:24:12.14

TCA.Split|$$LAA|$$LAB|$$LAC|$$LAD|$$LAE

DBP.$$LAB#$$LAC#$$LAD#$$LAE

' Result is "01#24#12#014"

ENR.

 

 

Syntax

 

TCA.Split|P1|P2|P3|P4|P5|P6

TCA.Spl|P1|P2|P3|P4|P5|P6

 

 

 

Parameter Explanation

 

 

P1 - Variable for original Timestamp

P2 - Variable for Hours-Value

P3 - Variable for Minutes Value

P4 - Variable for Seconds-Value

P6 - Variable for Miliseconds Value

 

Any Parameter P2 to P6 can be omitted or replaced with a "-", in which case this value is been placed on TOS.

 

 

Example

 

'**********************************************

' TCA.Split - Sample

'**********************************************

'

$$LAA=01:24:12.14

TCA.Split|$$LAA|$$LAB|$$LAC|$$LAD|$$LAE

DBP.$$LAB#$$LAC#$$LAD#$$LAE

TCA.Make|$$LAF|$$LAB|$$LAC|$$LAD|$$LAE

DBP. Result is: $$LAF

ENR.

 

 

 

Remarks

 

-

 

 

 

Limitations:

-

 

 

See also:

 

    1.5.1.3. Using Variables

    DAT. - Date and Time Information (System independent)

    VTT. - Value to Time

    TTV. - Time to Value

    VTD. - Value to Date

    DTC. - Date and Time Calculation

    VTF. - Verify Time Format

    VDF. - Verify Date Format

    IDC. / NDC. - If Date Command

    CAL. - mathematical CALculation

    CAX. - Calculate Extended