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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -