How to calculate a Julian date for a specific date

I have been trying to find a way to calculate a Julian date and after searching the net found
set julianDate to do shell script “date ‘+%j’”
it works but only uses the current date, can I use a selected date field with this command?
Any guidance gratefully received!