Start Back Next End
  
ZBasic System Library
242
ZBasic Microcontrollers
PutDate
Type
Subroutine
Invocation
PutDate(year, month, day)
Parameter
Method
Type
Description
year
ByVal
int16
The year value (1999-2177).
month
ByVal
Byte
The month value (1-12).
day
ByVal
Byte
The day value (1-31).
Discussion
This routine composes a new value for Register.RTCDay using the provided parameters.  The month
value of 1 corresponds to January while 12 corresponds to December.  If the year or month is invalid or if
the day number is invalid for the specified month and year, Register.RTCDay will be set to zero.
Note that Register.RTCDay is initialized to zero on power-up or reset.  This corresponds to January 1,
1999.
Compatibility
This subroutine is not available if the RTC is not enabled in your application.
See Also
Previous page Top Next page