date calc

view story

http://www.unix.com – Hi, I need subtract two date values (which are in day of the year format) and the output would give the remaining days. using the command date +"%j" i would get today's 'day of the year' i.e., Code: > date +"%j" 256 Next, i need to take input of a previous date in the format 09/05/2012 and then convert it to 'day of the year format'. Could anyone please help how i could do this? Note: I'm using HP-UX (HowTos)