Jan-31-2022, 10:09 PM
In the following code, s is returned as an integer
The output is 1
How do I convert the integer s into a string with two decimal places.
i.e. I would like to print the month as 01 not 1
I assume I need a statement such as..
s = format(???????) before the print statement,.
The output is 1
How do I convert the integer s into a string with two decimal places.
i.e. I would like to print the month as 01 not 1
I assume I need a statement such as..
s = format(???????) before the print statement,.
import datetime current_time = datetime.datetime.now() s = current_time.month print(s)