en:software:qview:qview_6:qcl_library:vc20mktime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:software:qview:qview_6:qcl_library:vc20mktime [2017/02/03 17:17] – [Esempio] qem103en:software:qview:qview_6:qcl_library:vc20mktime [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== VC20MkTime ======
 +
 +Passing the reference to a CALENDAR device the **VC20MkTime** function __gives the number of seconds elapsed from 1 January 00:00 of 1970 (Epoch Time) until the date introduced__.\\
 +This data is useful to be able to make comparisons between dates.\\
 +The function also runs day and month values greater than its natural limits (day > 31 or month > 12), automatically calculating the date.
 +
 +===== IMPLEMENTATION =====
 +
 +**VC20MkTime (calendar, errorCode, seconds, dayOfWeek, dayOfYear )**
 +
 +Parameters:
 +
 +^  IN/OUT  ^  VARIABLE TYPE  ^  EXAMPLE NAME  ^  DIM  ^  ^
 +|  IN    CALENDAR  |  calendar (INTDEVICE)  |  -  |Reference to a CALENDAR device|
 +|  OUT  |  GLOBAL    |  errorCode              B  |Error code:\\ 0 = No\\ 1 = Day ≤ 0\\ 2 = Month ≤ 0\\ 3 = Year introduced off limits [1970÷2037]|
 +|  OUT  |  GLOBAL    |  seconds                L  |Sum of elapsed seconds from 00:00 of 1 January 1970 until date introduced|
 +|  OUT  |  GLOBAL    |  dayOfWeek              B  |Day of the week:\\ 0 = sunday\\ 1 = monday\\ 2 = tuesday\\ 3 = wednesday\\ 4 = thursday\\ 5 = friday\\ 6 = saturday|
 +|  OUT  |  GLOBAL    |  dayOfYear              W  |Number of days gone by than the 1 January of the introduced year|
 +
 +=== Example ===
 +
 +To enable a digital output (ofUscita01) when the date and current time exceeds a previously set date and time.