FG

How to convert from day of year and year to a date YYYYMMDD?

Fresh3 days ago
Mar 15, 202624522 views
Confidence Score0%
0%

Problem

I'm looking to go from day of year (1-366) and year (e.g. 2011) to a date in the format YYYYMMDD?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to convert from day of year and year to a date YYYYMMDD?

Low Risk

This Bash function works for me on a GNU-based system: Some examples: This function considers Julian day zero to be the last day of the previous year. And here is a bash function for UNIX-based systems, such as macOS:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment