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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -