Echelon OpenLNS User Manual

Page 386

Advertising
background image

OpenLNS Programmer's Reference

349

restrictions to how each part of the time can be displayed.

This applies to format specifications containing the time()

macro in their text format specification, such as

SNVT_Time_time#LO:
text(time(hour, minute, second))

When setting the format used to display hours, you can

use the following formats:

o

"H" to display the hours with as few digits as

possible.

o

"HH" to display the always hours with double digits,

with leading zeros for hours 0-9. Note that OpenLNS

will display all times in 24-hour format.

When setting the format used to display minutes, you can

use the following formats:

o

"m" to display the minutes with as few digits as

possible.

o

"mm" to always display the minutes with double

digits, with leading zeros for minutes 0-9.

When setting the format used to display seconds, you can

use the following formats:

o

"s" to display the seconds with as few digits as

possible.

o

"ss" to always display the seconds with double digits,

with leading zeros for seconds 0-9. Note that time

formats that include milliseconds will append the

three-digit milliseconds to the seconds field,

separated by a decimal point character.

Here are some example strings you could use for this

property, with examples of how a short time would appear for

each one.
ShortTimeFormat Example

H/m/s

3:41:7.111

HH/m/ss

03:41:07.111

H/mm/ss

15:06:33.333

The following examples assume the

TimeFormatSeparator

property is set to the colon character (:). If you specify a

character other than M, d, y, or the

TimeFormatSeparator

character when writing to this property, the LCA, #87

lcaErrStringInvalidChar exception will be thrown. If you

specify additional characters that would cause LNS to

display times in 12-hour format, the LCA, #160

lcaErr12HourTimeFormatNotSupported exception will

be thrown.
If you change the

TimeFormatSeparator

property after

setting the ShortTimeFormat property, OpenLNS will

Advertising