Looking for a date function that can calculate the day of the year from a given date

I am looking for a date function that can calculate the day of the year from a given date (YYYYMMDD) eg. 20230603

Thanks for help/tips with coding.

Calendar.get(DAY_OF_YEAR)

2 Likes

Thank you for help with the code @GoToLoop