Package hw
Class DateTime

Public Method toString

String toString()

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Returns Description
String year, month, day, hour, minute, second within a single string

A new created DateTime object can be used to save the current date derived from the real-time clock. The date and the time are assigned to a DateTime object when the IO.getDateTime() method is called. Once a DateTime object is created, the year, month, day, weekday, hour, minute, and second values at the objects creation time will be stored into the DateTime object for further use. The toString() method returns the year, month, day, hour, minute, and second in one string ("year/month/day hour:minute:second").

Note

Example

DateTime saveCurrentDateTime = IO.getDateTime();

Console.println("stored date and time: " + saveCurrentDateTime.toString());

See also:

IO.getDateTime()
IO.getDate()
IO.getTime()
IO.setDate(int, int, int, int)
IO.setTime(int, int, int)