Hi friends,
I need some urgent help on Dates in unix.
I have a date say - "20080706", i need some command to display the day, here its sunday(06). Please help me out.
FYI: I use Ksh.
I/P - 20080706
O/P - Sunday
Hi friends,
I need some urgent help on Dates in unix.
I have a date say - "20080706", i need some command to display the day, here its sunday(06). Please help me out.
FYI: I use Ksh.
I/P - 20080706
O/P - Sunday
If you have the GNU date installed:
date --date "20080706" +%A
Otherwise you can use the datecalc script of Perderabo:
http://www.unix.com/unix-dummies-questions-answers/4870-days-elapsed-between-2-dates.html\#post16559
Regards