am stuck trying to figure out how to convert extracted "datetime.datetime(YYYY, mm, dd, HH, MM, SS)" format to decimal "YYYYmm.DDHH"
I have tried code below but it's not taking me any further
my_date = datetime.datetime(2016, 2, 28, 13, 50, 36)
def check_date_type(d):
if type(d) is datetime.datetime:
return d
if type(d) is list:
return d[0]
print(check_date_type(my_date))
I expect an output as below. NOTE that February is presented as '02' in the expected output
201602.2813