.Getdata Method (Previously .Get)

Function:

Returns current RTC data as the number of elapsed days, minutes and seconds.

Syntax:

rtc.getdata(byref daycount as word, byref mincount as word, byref seconds as byte)

Returns:

Number of elapsed days, minutes, and seconds. Notice that this is done indirectly, through byref arguments.

See Also:

RTC Object

Part

Description

daycount

Number of elapsed days.

mincount

Number of elapsed minutes.

seconds

Number of elapsed seconds.

Details

Some platforms include a set of convenient date and time conversion functions that can be used to transform "elapsed time" values into current weekday, date, and time (see weekday, year, month, date, hours, minutes).

note_warning-wt

When the RTC is powered up after being off (that is, device had not power AND no backup power for a period of time), it may not work correctly until you set it using rtc.set method. Incorrect behavior may include failure to increment or incrementing at an abnormal rate. Rtc.running cannot be used to reliably check RTC state in this situation.

It is not necessary to use rtc.set if the backup power was present while the device was off.

note_tip-wt

With Tibbo BASIC/C release V2, this method had to be renamed from .get to .getdata. This is because the period (".") separating "rtc" from "getdata" is now a "true" part of the language, i.e. it is recognized as a syntax unit, not just part of identifier. Hence, Tibbo BASIC/C sees "rtc" and "get" as separate entities and "get" is a reserved word that can't be used.