beautypg.com

Timetonumber – Metrohm tiamo 1.1 Manual User Manual

Page 80

background image

52

General program functions

Parameter

Text

The parameter must only contain numerical characters or Variables of the
type

Text

as otherwise type conversion is not possible (result = "

invalid

").

You can use the following characters as Separators between year, month,
etc.: slash (

/

), full stop (

.

), minus (-), semicolon (

;

), colon (

:

), empty space

and comma. You can determine the Sequence of the individual entries

yourself, but these must be entered in the parameter

Format

.

Format

Defines in which format or sequence the text must be entered. This pa-
rameter must be enclosed with Inverted commas and can be composed
of the following code characters:

Character

Meaning

y

Year

M

Month

d

Day

H

Hour 0...23

h

Stunde AM/PM

m

Minute

s

Second

a

AM/PM marking

Note
If you enter the time in the format

AM/PM then in addition to the formatting char-

acter

h you must us the AM/PM marking a (see first example below).

Examples

TextToTime("2004-12-3 5:22:01 PM";"yMdhmsa") = 2004-12-03 17:22:01
UTC+1

(depends on the system time)

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

(depends on the system time)

TextToTime('CV.TestDate';'CV.TestFormat')

= values of the Common vari-

ables in the entered time format

TextToTime('MV.ID1';'CV.TestFormat')

= entered text of ID1 in the given time

format

TimeToNumber

Syntax

y = TimeToNumber(Time)

Returns the entered time as

Number

.

Note
In both the automatic and the explicit conversion of a

Time into the type Num-

ber the number of days since 30 December 1899 at 01 a.m. will be counted.

Note: 30 December 1899 01 a.m. = 0.00000 days, this number is rounded to 5

decimal places; however, e.g. a comparative operation will be carried out with
the exact value.