5 timetonumber, Timetonumber – Metrohm tiBase 1.1 User Manual

Page 67

Advertising
background image

■■■■■■■■■■■■■■■■■■■■■■

2 General program functions

tiBase 1.1

■■■■■■■■

59

Examples
TextToTime("2004-12-3 5:22:01 PM";"yMdhmsa") = 2004-12-03
17:22:01 UTC+1
(dependent on the system time)

TextToTime("12-15-01 2001:3:5";"HmsyMd") = 2001-03-05
12:15:01 UTC+1
(dependent on the system time)

TextToTime('CV.TestDate';'CV.TestFormat') = Values of the com-
mon variables in the time format indicated

TextToTime('MV.ID1';'CV.TestFormat') = entered text of ID1 in the
time format indicated

2.4.4.7.5

TimeToNumber

Dialog window: Formula editor

Operators/Functions

Syntax
y = TimeToNumber(Time)

Gives the entered number as a Number.

Note

Both for the automatic and explicit conversion of a Time to the type
Number the number of days are counted since December 30, 1899
at 01 hours
.

Attention: December 30, 1899 01 hours = 0.00000 days, this number
is rounded off to 5 decimal places, but a relational operation for exam-
ple is carried out with the exact value.

Parameters
Time

This parameter can be indicated either in the form of a time function or as
a variable of the type Time.

Examples
TimeToNumber(Time()) = current date and current time represented as
Number (in days since December 1899)

TimeToNumber(Time(1999;12;31;23;59;59)) = 36525.95832

TimeToNumber(Time('TestYear';'TestMonth';'TestTag')) = Value of
the common variables as number of days as a Number

Advertising