I am trying to figure out how to convert the current date to the 6 digit format in Julian date. So for instance, 2020-11-06 would need to be 120311. I can't figure out how to get the century number and the year before the day number. Here is the code I have so far that is printing out the day number:
def datetojulian(calendarDate):
fmt='%Y-%m-%d'
sdtdate = datetime.datetime.strptime(calendarDate, fmt)
sdtdate = sdtdate.timetuple()
jdate = sdtdate.tm_yday
return jdate