Dttostring - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions

DtToString

The DtToString instruction converts a date and time to a text string.
Instruction
DtToString
Date and
Time-to-Text String
Conversion
Variables
Name
Meaning
In
Date and
time
Out
Text string
Bit strings
In
Out
Function
The DtToString instruction converts date and time In to a text string. A NULL character is placed at the
end of text string Out.
An example when In is 2010-5-23-07:00:15.873232345 (7:00 am and 15.873232345 seconds on May
23, 2010) is given below. The value of variable abc will be '2010-05-23-07:00:15.873232345'.
LD
DT#2010-05-23-07:00:15.873232345
The DtToString instruction converts date and time In to a text string.
The value of In is 7:00 am and 15.873232345 seconds on May 23, 2010, so the value of abc will be '2010-05-23-07:00:15.873232345'.
In
DT#2010-05-23-07:00:15.873232345
2-456
Name
FB/FUN
FUN
I/O
Description
Input
Date and time
Output
Text string
DtToString
EN
ENO
In
Converted to text string.
Graphic expression
(@)DtToString
EN
ENO
In
Out
Valid range
Depends on data type.
30 bytes (29 single-byte
alphanumeric charac-
ters plus the final NULL
character)
Integers
ST
abc:=DtToString(DT#2010-05-23-07:00:15.873232345);
abc
Out=abc
'2010-05-23-07:00:15.873232345'
NY-series Instructions Reference Manual (W560)
ST expression
Out:=DtToString(In);
Unit
Default
Year, month,
DT#197
day, hour,
0-1-1-
minutes,
0:0:0
seconds
---
---
Times, durations,
dates, and text strings
OK
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents