Functions - text – Metrohm tiamo 1.3 Manual User Manual
Page 78

52
General program functions
Character
Meaning
Example
a
Format AM/PM
AM, PM
'
Introductory and terminating characters for entering any text
''
Enters '
'
Note
If you want to return the time in the format
AM/PM then in addition to the format-
ting character
h you must use the AM/PM marking a.
Examples
TimeToText(Time())
= current date and current time (system) as
Text
TimeToText(Time(2004;05;04)) = 2004-05-04 00:00:00 UTC+2
(depends on
the system time)
TimeToText('CV.TestTime')
= value of the Common variable (type Time) as
Text
TimeToText(Time(2000;12;31);"EEEE', 'dd'.'MMMM' 'yyyy") = Sunday, 31 De-
cember 2000
TimeToText(Time(1997;05;22);"M'/'d'/'yyyy', 'ha") = 5/22/1997, 12PM
Functions - Text
TextPosition
Syntax
y = TextPosition(Text ; Sample text)
Returns the Index that indicates at which position the
Sample text
first oc-
curs in the
Text
. The numbering of the index starts at 1!
Parameter
Text
The parameter can either be entered directly or as a Variable of the type
Text
,
Number
or
Date/Time
.
Sample text
The parameter can either be entered directly or as a Variable of the type
Text
,
Number
or
Date/Time
. If the types of the two parameters are not identi-
cal then the type
Sample text
will always be converted to
Text
(see Func-
tions - type conversion). If the
Sample text
is not contained in the
Text
then
"
invalid
" will be returned.
Note
Entries of the type
Number
are always given with one decimal place.
Example:
TextPosition("12345";3) = invalid
, as before the operation the 3 is con-
verted to 3.0 and this is not contained in the text.