I am new to Python, I have been asked to write a script to display the time difference. I get these times using shell scripts and are stored in some variables H1 and H2.
I was wondering if i could use datetime.datetime in Python to calculate the difference the below code is not possible
H1 = "2009,12,22,22,22" H2 = "2009,12,22,20,22" g =datetime.datetime(H1) - datetime.datetime(H2)
how could i pass variables or if it is not possible ?