Time - script and chart function
Time() formats an expression as a time value, in the time format set in the system variables in the load script, or in the operating system, unless a format string is supplied.
Syntax:
Time(number[, format])
Return data type: dual
Arguments:
Argument | Description |
---|---|
number | The number to be formatted. |
format | String describing how the resulting time string is to be formatted. If omitted, the short date format, time format, and decimal separator set in the operating system is used. |
Examples:
The examples below assume the following default settings:
- Time format setting 1: hh:mm:ss
- Time format setting 2: hh.mm.ss
Example 1:
Time( A )
where
A=0.375
Results | Setting 1 | Setting 2 |
---|---|---|
String: |
09:00:00 |
09.00.00 |
Number: |
0.375 |
0.375 |
Example 2:
Time( A )
where
A=35648.375
Results | Setting 1 | Setting 2 |
---|---|---|
String: |
09:00:00 |
09.00.00 |
Number: |
35648.375 |
35648.375 |
Example 3:
Time( A, 'hh-mm' )
where
A=0.99999
Results | Setting 1 | Setting 2 |
---|---|---|
String: |
23-59 |
23-59 |
Number: |
0.99999 |
0.99999 |