0

I have a custom date returned from SQL query as "20-JUL-2015".I want to add/subtract x number of days from this custom date.How can I do it.

My Operating system is UNIX solaris, so date -d and --date option is not available.

fedorqui
  • 275,237
  • 103
  • 548
  • 598
ball123
  • 11
  • 1
  • 4
  • Either write your own function (`awk` might be of help), or find one on the internet. – J. Chomel Apr 25 '16 at 12:29
  • Another easier way would be to let SQL do it - if you have connection, you can do the math on the database. Would this match your requirement? – J. Chomel Apr 25 '16 at 12:54
  • @chomel , I cannot use SQL MATH as this date returned from sqlquery sometime it might be blank. Is there any single perl command which i can user here in my bash script? – ball123 Apr 25 '16 at 14:02
  • @Elloit your post mentioned has requirement of installing tclsh in server which cannot be possible in my case as we have many servers. – ball123 Apr 25 '16 at 14:07

0 Answers0