I need a Script to convert today's date to julian date. Can someone help?
from datetime import datetime # Get today's date today = datetime.today() # Convert to Julian date (day of the year) julian_date = today.strftime('%j') print(f"Today's date: {today.strftime('%Y-%m-%d')}") print(f"Julian date: {julian_date}")
Did you mean something more than that?
<CoPilot result>
thks Kevin. If I have this below, what do I have to write to convert my EffectiveDateTime to Julian ?
if header.find('./info:EffectiveDateTime', ns) is not None:
Date = header.find('./info:EffectiveDateTime', ns).text
else: Date = ''