I have the following variable start_date:
start_date
Timestamp('2003-03-31 00:00:00')
I want it to become: 31-03-2003
so I want the minut hours seconds to be removed and also the format to change as %d%m%Y
Can anybody help? Luigi
I have the following variable start_date:
start_date
Timestamp('2003-03-31 00:00:00')
I want it to become: 31-03-2003
so I want the minut hours seconds to be removed and also the format to change as %d%m%Y
Can anybody help? Luigi
I solved it this way:
start_date = datetime.strptime(start_date, '%Y-%m-%d %H:%M:%S')
start_date = start_date.strftime('%d-%m-%Y')
Thanks
Luigi