Converting a Flickr Datetime to a Python Datetime

1
2
3
4
5
def flickr_datetime_to_datetime(fdt):
	from datetime import datetime
	from time import strptime
	date_parts = strptime(fdt, '%Y-%m-%d %H:%M:%S')
	return datetime(*date_parts[0:6])

More like this

  1. Natural language date/time form fields by jdriscoll 6 years, 10 months ago
  2. DateTimeFluxCapacitor by jbcurtin 3 years, 2 months ago
  3. Complete Persian DateTime Widget by serj1975 2 years, 4 months ago
  4. copyright_since by xplozive 5 years, 1 month ago
  5. Converting datetime to Javascript milliseconds in epoch by guychi 6 years, 7 months ago

Comments

(Forgotten your password?)