current_time = datetime.datetime.day()
时间: 2023-09-07 14:14:00 浏览: 138
current_time = datetime.datetime.day()这段代码的目的是获取当前日期的天数。然而,这段代码是错误的,因为datetime.datetime.day()是一个方法,而不是属性。正确的方法是使用datetime.datetime.now().day来获取当前日期的天数。
#### 引用[.reference_title]
- *1* [c# datetime._C#| DateTime.Day属性与示例](https://blog.csdn.net/cumubi7453/article/details/107803576)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [c# datetime._C#| DateTime.TimeOfDay属性(带示例)](https://blog.csdn.net/cumudi0723/article/details/107793933)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文