-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocal_time.py
More file actions
25 lines (25 loc) · 746 Bytes
/
local_time.py
File metadata and controls
25 lines (25 loc) · 746 Bytes
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
<<<<<<< HEAD
import datetime as dt
#Here we will try to convert a string to a datetime object using a string input
# date_now=dt.date.today()
# local_time=dt.datetime.now().time()
# loco=local_time.strftime("%H:%M:%S")
# print(loco)
# print(date_now)
alar=input("Enter your alarm")
print(alar)
ala=dt.datetime.strptime(alar,"%H%M").time()
print(ala)
=======
import datetime as dt
#Here we will try to convert a string to a datetime object using a string input
# date_now=dt.date.today()
# local_time=dt.datetime.now().time()
# loco=local_time.strftime("%H:%M:%S")
# print(loco)
# print(date_now)
alar=input("Enter your alarm")
print(alar)
ala=dt.datetime.strptime(alar,"%H%M").time()
print(ala)
>>>>>>> 2cfe30de2f685ec458c182ee58d1beb7e4d61c15