I need to compare two julian dates and get the difference between the two. This is on a windows server and the dateDiff does not work. Any suggestions?
I need to compare two julian dates and get the difference between the two. This is on a windows server and the dateDiff does not work. Any suggestions?
Jeannette–
You might try getting GNU date (a binary for Windows is in the Coreutils package at http://gnuwin32.sourceforge.net/packages.html). If you’re not familiar with GNU date it will pop your eyes with the number of different input forms it will accept (“yesterday” and “last monday” come to mind, the day of the year is no problem.) It has an extensive set of formatting options for output as well. You can pretty easily convert your J dates to epoch dates, subtract them and reconvert via ‘date’ or with a little arithmetic.
‘date’ first came to my mind because I’ve been scripting something which needs to get the date for “yesterday”, and there’s no easier way for that than a quick pipe to date.
–kevin (duh) kinnell
Author
Replies
Viewing 2 reply threads
The forum ‘Cloverleaf’ is closed to new topics and replies.