-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDatetime Shortcuts.py
32 lines (21 loc) · 1.16 KB
/
Datetime Shortcuts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from datetime import datetime
List = f""""
Year in Full Form: (%Y) :{datetime.now().strftime("%Y")}
Month Name Full Form: (%B) :{datetime.now().strftime("%B")}
Month Name Short Form: (%b) :{datetime.now().strftime("%b")}
Day Name Full Form: (%A) :{datetime.now().strftime("%A")}
Day Name Short Form: (%a) :{datetime.now().strftime("%a")}
Date of Day: (%d) : {datetime.now().strftime("%d")}
Date of Month: (%m) : {datetime.now().strftime("%m")}
Day Name Short Form: ("%a-%A-%b-%B-%Y") :{datetime.now().strftime("%a-%A-%b-%B-%Y")}
Hour in 24 Hour Format: (%H) : {datetime.now().strftime('%H')}
Hour in 12 Hour Format: (%I) : {datetime.now().strftime('%I')}
AM or PM Know: (%p) : {datetime.now().strftime('%p')}
Current Minute Time: (%M) : {datetime.now().strftime('%M')}
Current Second Time: (%S) : {datetime.now().strftime('%S')}
Current Mili-Second Time: (%f) : {datetime.now().strftime('%f')}
Time in 24 Format: ('%H-%M-%S') {datetime.now().strftime('%H-%M-%S')}
Time in 12 Format: ('%I-%M-%S %p') {datetime.now().strftime('%I-%M-%S %p')}
Date Today Special: ('%Y - %m - %d') {datetime.now().strftime('%Y - %m - %d')}
"""
print(List)