import time
from datetime import datetime


def timesql(sqldatetime):
	"""
	Convert the SQL datetime to Unix-Timestamp
	"""
	return int(time.mktime(datetime.strptime(sqldatetime, '%Y-%m-%d %H:%M:%S').timetuple()))