beautypg.com

Functions - text, Textposition – Metrohm tiamo 1.1 Manual User Manual

Page 82

background image

54

General program functions

Character

Meaning

Example

ss

2-place time in seconds

03, 55

E

Abbreviated day of week

Mo, Tu, We

EEEE

Day of week

Monday, Tuesday

D

1- , 2- or 3-place number of day in year

2, 35, 142

DD

2- or 3-place number of day in year

02, 35, 142

DDD

3-place number of day in year

002, 035, 142

F

1-place number of day in month, e.g. the 2nd Monday in May

2

w

1- or 2-place number of week in year

5, 25

ww

2-place number of week in year

05, 25

W

1-place number of week in month

3

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

.