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