-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQL Connector test.py
More file actions
48 lines (26 loc) · 889 Bytes
/
Copy pathSQL Connector test.py
File metadata and controls
48 lines (26 loc) · 889 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 16 11:54:37 2020
@author: mohamedkhaled
"""
"""
from mysql.connector import (connection)
config = {"user":'root', "password":'Mm0925219354*',
"host":'localhost',
"database":'LYD_Exrates'
}
cnx = connection.MySQLConnection(**config)
cursor = cnx.cursor()
#cursor.execute("select * from USDLYD")
cursor.execute("insert into USDLYD (Price_Date,Buy,Sell) values ('2020-11-18',1.4342,1.3456)")
cnx.commit()
cnx.close()
"insert into USDLYD (Price_Date,Buy,Sell) values ('2020-11-18',1.4342,1.3456)"
"insert into USDLYD (Price_Date,Buy,Sell) values ('2020-11-17',1.3548,1.3616)"
"""
import datetime
Todaydate = datetime.datetime.now()
weekday = Todaydate.isoweekday()
thing = Todaydate.strftime('%H:%M')
print(datetime.date.today())