klyn.time.DateTime.toString
method
public override toString(format as String = "%Y-%m-%d %H:%M:%S") as String:
Description
Returns a string representation of this DateTime object.
import klyn.time

dateTime = DateTime(year=2023, month=10, day=5, hour=14, minute=30, second=45)
print(dateTime.toString())  # Output: 2023-10-05 14:30:45
Parameters
  • format The format string for the output.
Returns
A string representation of the DateTime object. ``` import klyn.time dateTime = DateTime(year=2023, month=10, day=5, hour=14, minute=30, second=45) print(dateTime.toString()) # Output: 2023-10-05 14:30:45 ```