Dttosec - Omron NY532-5400 Reference Manual

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

Advertisement

2 Instruction Descriptions

DtToSec

The DtToSec instruction converts a date and time to the number of seconds from 00:00:00 on January
1, 1970.
Instruction
DtToSec
Convert Date and
Time to Seconds
Variables
Name
Meaning
In
Date and
time
Out
Seconds
Bit strings
In
Out
Function
The DtToSec instruction converts the date and time in In to the number of seconds from 00:00:00 on
January 1, 1970. The converted value is in seconds. The value is truncated below the seconds.
The following example is for when In is DT#1970-1-2-0:0:0.999999999.
LD
DT#1970-1-2-0:0:0.999999999
In
Out=abc
2-622
Name
FB/FUN
FUN
I/O
Description
Input
Date and time
Output
Number of seconds from
00:00:00 on January 1, 1970
DtToSec
EN
In
DT#1970-1-2-0:0:0.999999999
DT#1970-1-1-0:0:0.000000000
LINT#86400
Graphic expression
(@)DtToSec
EN
ENO
In
Valid range
Depends on data type.
0 to 18446744073
Integers
OK
ST
abc:=DtToSec(DT#1970-1-2-0:0:0.999999999);
ENO
abc
s
[
NY-series Instructions Reference Manual (W560)
ST expression
Out:=DtToSec(In);
Out
Unit
Default
Year, month,
DT#197
day, hour,
0-1-1-
minutes, sec-
0:0:0
onds
Seconds
---
Times, durations, dates,
and text strings
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents