0

Hi I have a unixtime stamp (type= long). So when I tried to convert in to date format by this following method,

def render_validation_time(self, value): x = value.filter(field_name='pdbstatus').latest('id') validated_time = int(x.date_modified) return validated_time.strftime("%Y-%m-%d %H:%M:%S")

But it returned an error 'int' object has no attribute 'strftime' How can I solve this?

blackwindow
  • 437
  • 1
  • 8
  • 25

0 Answers0