database - Sqlite3 naming db file with a variable in python -


how can use current date name db file when runs creates db file named after current date. have far:

import sqlite3 import time   timedbname = time.strftime("%d/%m/%y")  # connecting database file conn = sqlite3.connect(???) 

with error same '/' or '-' or '.' in "%d/%m/%y":

conn = sqlite3.connect(timedbname, '.db') typeerror: float required 27.01.2016 

try using:

time.strftime("%d-%m-%y")

i guess doesn't work because of slashes in generated date.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -