glucopy.time_to_str#
- glucopy.time_to_str(time: time)[source]#
Converts a datetime.time object to a string with format ‘hh:mm:ss’
- Parameters:
time (datetime.time) – The time object to be converted
- Returns:
The time string
- Return type:
str
Examples
Convert a datetime.time object to a string
In [1]: import glucopy as gp In [2]: import datetime In [3]: t = datetime.time(10, 0, 0) In [4]: gp.time_to_str(t) Out[4]: '10:00:00'