basic calculations on time, figuring hours clocked

This commit is contained in:
Mikayla Dobson
2022-04-06 16:05:09 -05:00
parent a758526bfc
commit a75bff67cf
5 changed files with 99 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
import sqlite3
from user_input import *
from datetime import datetime
from datetime import datetime, timedelta
# establish a connection to a .db file and create a cursor object
con = sqlite3.connect('data.db')
@@ -50,12 +50,14 @@ def get_table_length():
table_rows.append(row)
return len(table_rows)
def get_stamp_by_date():
pass
def get_weekly_hours():
pass
current_time = datetime.now()
minus_week = current_time - timedelta(days = 7)
return cur.execute("""
SELECT time_in, time_out FROM TIMESTAMPS
WHERE time_in>:minus_week
""", {"minus_week": minus_week})
def get_all_hours():
pass