Closed Devdattathube closed 10 months ago
Expiry date is in epoch. This is the code I am using after loading file into pandas
dataframe;
for _, row in df.iterrows():
expiry = datetime.datetime.fromtimestamp(row['pExpiryDate'])
if expiry.year < datetime.datetime.now().year:
expiry = date(expiry.year + 10, expiry.month, expiry.day)
Note that epoch starts from Jan 1, 1970 but for some reason the file considers the epoch starting from Jan 1, 1980. So, I am manually adding 10 years. Hope it helps.
can you please tell me how the expiry date will be unaffected by the leap year?
The expiry dates are in epoch format, after converting it you need to add 10 years to it to get the actual expiry. Hope it helps.
please help on the format of expiry date in scrip master file. i am not able to figure out in which format is the expiry date