beautypg.com

8 text functions, 1 textposition, Textposition – Metrohm viva 1.0 Manual User Manual

Page 73

background image

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

2 General program functions

viva 1.0

■■■■■■■■

61

Characters

Meaning

Example

'

Quotation marks used for entering
any text

''

Entry of '

'

NOTE

If you wish to indicate the time in the AM/PM format, it is necessary,
in addition to the formatting character h, to use the AM/PM marking a
(see last example below).

Examples
TimeToText(Time()) = current date and current time (system) as Text

TimeToText(Time(2004;05;04)) = 2004-05-04 00:00:00 UTC+2
(dependent 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, December 31, 2000

TimeToText(Time(1997;05;22);"M'/'d'/'yyyy', 'ha") = 5/22/1997,
12PM

2.3.4.8

Text functions

2.3.4.8.1

TextPosition

Dialog window: Formula editor

Operators/Functions

Syntax
y = TextPosition(Text; sample text)

Returns the Index which indicates at which point the sample text
appears for the first time in the Text. The numbering of the index begins
at 1!

Parameters
Text

The parameter can be indicated either directly or as a variable of the Text,
Number or Date/Time type.

Sample text

The parameter can be indicated either directly or as a variable of the Text,
Number or Date/Time type. If the types of the two parameters do not
coincide, the type is converted from Sample text to Text. If the Sample
text
is not included in the Text, the status invalid is returned.