convert_pytime
No overview available.
def convert_pytime(
pytime: datetime,
format_string: string = %Y-%m-%d %H:%M:%S
) - > string
Converts a Python datetime object into a formatted string or a specific timestamp format suitable for API consumption or database storage.
Parameters
| Name | Type | Description |
|---|---|---|
| pytime | datetime | The Python datetime object to be converted into a string format. |
| format_string | string = %Y-%m-%d %H:%M:%S | The strftime-compatible format pattern used to determine the structure of the output string. |
Returns
| Type | Description |
|---|---|
string | The formatted date and time string representing the input datetime object. |