Jan-08-2017, 09:34 AM
(Jan-06-2017, 04:48 PM)ichabod801 Wrote: datetime.fromtimestamp takes as a parameter the number of seconds since the epoch. That's not what you have, you have the digits of the various parts of the date/time concatenated together to make an integer.
I would break apart the number you have and feed it into the standard datetime constructor, which takes parameters like year, month, day, hour, minutes, and seconds. You could do that either with mod (%) and integer division (//), or you could make the number a string, use slices to get the parts you want, and convert them back into integers. My guess is that the number you have is already a string, and that's why you're getting a conversion error instead of an incorrect date.
THanks Its working