2 Instruction Descriptions
2-434
NJ-series Instructions Reference Manual (W502)
Out is in nanoseconds. To get a text string in seconds or milliseconds, combine this instruction with the
LEFT or RIGHT instruction (page 2-522).
An example to get a text string in seconds is given below.
An error occurs in the following case. ENO will be FALSE, and Out will not change.
• The conversion result exceeds the valid range of Out.
Additional Information
Precautions for Correct Use
DtToString
EN ENO
In
LEFT
EN ENO
In
L
DT#2000-01-23-01:23:45.678
UINT#19
def
abc
abc
● LD
● ST
def:=LEFT(DtToString(DT#2000-01-23-01:23:45.678), UINT#19);
P_On