B&B Electronics VFG3000 - Manual User Manual
Page 268

G
ET
D
ATE
(
TIME
)
AND
F
AMILY
V
LINX
F
IELDBUS
G
ATEWAY
M
ANAGER
U
SER
M
ANUAL
P
AGE
252
G
ET
D
ATE
(
TIME
)
AND
F
AMILY
A
RGUMENT
T
YPE
D
ESCRIPTION
time
int
The time value to be decoded.
D
ESCRIPTION
Each member of this family of functions returns some component of a time/date value, as
previously created by
GetNow
,
Time
or
Date
. The available functions are as follows…
F
UNCTION
D
ESCRIPTION
GetDate
Returns the day-of-month portion of time.
GetDay
Returns the day-of-week portion of time.
GetDays
Returns the number of days in time.
GetHour
Returns the hours portion of time.
GetMin
Returns the minutes portion of time.
GetMonth
Returns the month portion of time.
GetSec
Returns the seconds portion of time.
GetWeek
Returns the week-of-year portion of time.
GetWeeks
Returns the number of weeks in time.
GetWeekYear Returns the week year when using week numbers.
GetYear
Returns the year portion of time.
Note that
GetDays
and
GetWeeks
are typically used with the difference between two time
values to calculate how long has elapsed in terms of days or weeks. Note also that the year
returned by
GetWeekYear
is not always the same as that returned by
GetYear
, as the former
may return a smaller value if the last week of a year extends beyond year-end.
F
UNCTION
T
YPE
These functions are passive.
R
ETURN
T
YPE
int
.
E
XAMPLE
d := GetDate(GetNow() – 12*60*60)