Jump to content

Unix Experts Ravalamma


Recommended Posts

Posted

How to add x months to a date and get the future date.

Please help

Posted
date
Sun Sep 23 08:19:56 BST 2012
NEW_expration_DATE=$(date -d "+10 days")
echo $NEW_expration_DATE
Wed Oct 3 08:12:33 BST 2012 
  -d, --date=STRING
          display time described by STRING, not ‘now’

This is quite a powerful tool as you can do things like

date -d "Sun Sep 11 07:59:16 IST 2012+10 days"
Fri Sep 21 03:29:16 BST 2012

or

TZ=IST date -d "Sun Sep 11 07:59:16 IST 2012+10 days"
Fri Sep 21 07:59:16 IST 2012

or

prog_end_date=`date '+%C%y%m%d' -d "$end_date+10 days"`
So if $end_date=20131001, $prog_end_date=20131011
Posted

   chandu _babu movie release mundu vochi reviews ichetodivi emaindi emdaya ravdam ledu  bye1

Posted

dateSun Sep 23 08:19:56 BST 2012NEW_expration_DATE=$(date -d "+10 days")echo $NEW_expration_DATEWed Oct 3 08:12:33 BST 2012

-d, --date=STRING          display time described by STRING, not ‘now’
This is quite a powerful tool as you can do things like
date -d "Sun Sep 11 07:59:16 IST 2012+10 days"Fri Sep 21 03:29:16 BST 2012
or
TZ=IST date -d "Sun Sep 11 07:59:16 IST 2012+10 days"Fri Sep 21 07:59:16 IST 2012
or
prog_end_date=`date '+%C%y%m%d' -d "$end_date+10 days"`So if $end_date=20131001, $prog_end_date=20131011


For days we can use above. .. but how to add X months to some date in past
Posted

chandu _babu movie release mundu vochi reviews ichetodivi emaindi emdaya ravdam ledu bye1

Koncham busy bhaiyya
Posted

Koncham busy bhaiyya

 

time chusikuni review post chesi po man .. correct info chepthunde nuvvu aithe bye1

×
×
  • Create New...