convert dd/mm/yyyy hh:mm:ss to date time python code example Example: yyyy-mm-dd hh:mm:ss.0 python now = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")