Using this code I am trying to extract just the day number from this date. In this example it would be 30. When I try to print with the range[] function I get the error. How can I just print this desired number?
I am unable to turn into a str function or use the range function to select my desired number.
If you are trying to extract the day, you should use .day from the datetime module.
dt_m = datetime.datetime.fromtimestamp(m_time)
print(dt_m.day)
The output will be the day, or in your case 30.