SyntaxFix
Write A Post
Hire A Developer
Questions
Seems to be quite efficient:
import datetime day, month, year = '01/12/2011'.split('/') datetime.datetime(int(year), int(month), int(day)).timestamp()
1.61 µs ± 120 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)