GetDayOfYear Gets the day of year from a DateTime, and returns null if the specified date time is null.