from datetime import datetime shifted = id >> 22 timestamp = shifted + 1288834974657 time_created = datetime.fromtimestamp(timestamp/1000).strftime('%Y-%m-%d')