Tipo di dati: DATE
I tipi di dati per dati e tempo DATE
, DATE_AND_TIME
(DT
), E TIME_OF_DAY
(TOD
) sono gestiti internamente come un DWORD
(valore a 32 bit).
I tipi di dati LDATE
, LDATE_AND_TIME
(LDT
), e LTIME_OF_DAY
(LTOD
) sono trattati internamente come an LWORD
(valore a 64 bit).
Tipo di dati | Limite inferiore | Limite inferiore | Limite superiore | Memoria | Risoluzione | Descrizione |
---|---|---|---|---|---|---|
|
|
| 32 bit | Secondi (sebbene venga visualizzato solo il giorno) | Sintassi: Sintassi: | |
|
|
| 32 bit | Secondi | Sintassi: Sintassi: | |
|
|
| 32 bit | Millisecondi | Sintassi: Sintassi: | |
|
|
|
| 64 bit | Nanosecondi (sebbene venga visualizzato solo il giorno) | Sintassi: |
|
|
|
| 64 bit | Nanosecondi | Sintassi: Sintassi: |
|
|
| 64 bit | Nanosecondi | Sintassi: Sintassi: |
VAR //Date dateBottom : DATE := DATE#1970-1-1; dateTop : DATE := DATE#2106-2-7; dateAppointment : DATE := D#2020-2-7; // D as data type prohibited //Date and time dtBottom : DATE_AND_TIME := DATE_AND_TIME#1970-1-1-0:0:0; dtTop : DT := DATE_AND_TIME#2106-02-07-06:28:15; dtAppointment : DT := DT#2020-2-7-12:55:1.234; //Time of day todBottom : TIME_OF_DAY := TIME_OF_DAY#0:0:0; todTop : TOD := TIME_OF_DAY#23:59:59.999; todAppointment : TOD := TOD#12:3:4.567; // Long date ldateBottom : LDATE := LDATE#1970-1-1; ldateTop : LDATE := LDATE#2106-2-7; ldateAppointment : LDATE := LD#2020-2-7; // LD as data typ prohibited // Long date and time ldtBottom : LDATE_AND_TIME := LDATE_AND_TIME#1970-1-1-0:0:0; ldtTop : LDT := LDATE_AND_TIME#2262-4-10-23:34:33.709551615; ldtAppointment : LDT := LDT#2020-2-7-12:55:1.234567891; //Long time of day ltodBottom : LTIME_OF_DAY := LTIME_OF_DAY#0:0:0; ltodTop : LTOD := LTIME_OF_DAY#23:59:59.999999999 ; ltodAppointment : LTOD := LTOD#12:3:4.567890123; END_VAR
Per ulteriori informazioni, vedere: Costante: Data e Ora , DATE, DT, TOD, LDATE, LDT, LTOD