0
for i in data:
        End_Date = i.end_date
        a = int(End_Date)/1000.0

        b = a - 2629743.0
        DateTimeStamp=int(time.time()) 
        if b >= DateTimeStamp:
            mes = "Good to GO" 
        else:
            mes = "Academic year yet to complete"
        Edate = str(datetime.fromtimestamp(int(End_Date)/1000.0).strftime('%d-%m-%Y'))

Error Line:- Edate = str(datetime.fromtimestamp(int(End_Date)/1000.0).strftime('%d-%m-%Y'))

ValueError: timestamp out of range for platform time_t

I'm not able to solve this issue. I tried using

Edate = time.strftime('%m/%d/%Y',  time.gmtime(int(End_Date)/1000.0))

But Still it is showing same error

  • Possible duplicate of https://stackoverflow.com/questions/36179914/timestamp-out-of-range-for-platform-localtime-gmtime-function – bigbounty Mar 08 '18 at 06:24
  • I throws the error on """Edate = str(datetime.fromtimestamp(int(End_Date)/1000.0).strftime('%d-%m-%Y'))""" this line. Why it is not converted to datetime format – Mohammed Rafik Mar 08 '18 at 06:48

0 Answers0