威望0
积分7946
贡献0
在线时间763 小时
UID1
注册时间2021-4-14
最后登录2024-11-21
管理员
- UID
- 1
- 威望
- 0
- 积分
- 7946
- 贡献
- 0
- 注册时间
- 2021-4-14
- 最后登录
- 2024-11-21
- 在线时间
- 763 小时
|
Always gives me perfect date.
Sample Output
Current Day is: 1
Current Month is: 2
Current Year is: 2020
Current Hour is: 17
Current Minute is: 3
Current Second is: 8
Current Microsecond is: 556483
[mw_shl_code=python,true]from datetime import datetime
now = datetime.now()
print("Current Day is:", now.day)
print("Current Month is:", now.month)
print("Current Year is:", now.year)
print("Current Hour is:", now.hour)
print("Current Minute is:", now.minute)
print("Current Second is:", now.second)
print("Current Microsecond is:", now.microsecond)[/mw_shl_code] |
|