import sqlite3, os
database = "Endless Feed"
here_i_am = os.path.dirname(os.path.abspath(__file__))
database = here_i_am + r"\\" + database + ".db"
count = 1
conn = sqlite3.connect(database)
cur = conn.cursor()
cur.execute("SELECT LAST_PLAYED FROM Last_Played_Tracks")
rows = cur.fetchall()
for row in rows:
    dy = row[0][0:2]
    mh = row[0][3:6]
    rest = row[0][5:]
    noodate = mh + dy + rest
    cur.execute("UPDATE Last_Played_Tracks SET LAST_PLAYED = '" + noodate + "'WHERE LAST_PLAYED = '" + row[0] + "'")
    conn.commit()
    print(str(count) + " - " + str(row[0]) + " Becomes " + str(noodate))
    count = count + 1