05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GETDATE (TIME) AND FAMILY<br />

CRIMSON USER MANUAL - MODULAR CONTROLLER<br />

GETDATE (TIME) AND FAMILY<br />

ARGUMENT TYPE DESCRIPTION<br />

time int The time value to be decoded.<br />

DESCRIPTION<br />

Each member of this family of functions returns some component of a time/date value, as<br />

previously created by GetNow, Time or Date. The available functions are as follows…<br />

FUNCTION<br />

GetDate<br />

GetDay<br />

GetDays<br />

GetHour<br />

GetMin<br />

GetMonth<br />

GetSec<br />

GetWeek<br />

GetWeeks<br />

GetWeekYear<br />

GetYear<br />

DESCRIPTION<br />

Returns the day-of-month portion of time.<br />

Returns the day-of-week portion of time.<br />

Returns the number of days in time.<br />

Returns the hours portion of time.<br />

Returns the minutes portion of time.<br />

Returns the month portion of time.<br />

Returns the seconds portion of time.<br />

Returns the week-of-year portion of time.<br />

Returns the number of weeks in time.<br />

Returns the week year when using week numbers.<br />

Returns the year portion of time.<br />

Note that GetDays and GetWeeks are typically used with the difference between two time<br />

values to calculate how long has elapsed in terms of days or weeks. Note also that the year<br />

returned by GetWeekYear is not always the same as that returned by GetYear, as the former<br />

may return a smaller value if the last week of a year extends beyond year-end.<br />

FUNCTION TYPE<br />

These functions are passive.<br />

RETURN TYPE<br />

int.<br />

EXAMPLE<br />

d := GetDate(GetNow() – 12*60*60)<br />

PAGE 336<br />

http://www.redlion.net/controller

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!