I want to get the difference between these two dates (Fenddt - Rptdt) in days at a new variable called days
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str10 Stkcd str24 Rptdt str20 Fenddt "000001" "2002-06-28" "2002-12-31" "000001" "2002-07-18" "2002-12-31" "000001" "2003-04-04" "2003-12-31" "000001" "2003-06-04" "2003-12-31" "000001" "2004-03-29" "2004-12-31" "000001" "2004-04-15" "2004-12-31" "000001" "2004-04-15" "2004-12-31" "000001" "2004-04-15" "2005-12-31" "000001" "2004-04-15" "2005-12-31" "000001" "2004-06-29" "2004-12-31" "000001" "2004-06-29" "2005-12-31" "000001" "2004-08-18" "2004-12-31" "000001" "2004-08-18" "2005-12-31" "000001" "2004-08-18" "2006-12-31" "000001" "2005-05-09" "2005-12-31" "000001" "2005-05-09" "2006-12-31" "000001" "2005-05-09" "2007-12-31" "000001" "2005-07-31" "2005-12-31" "000001" "2005-07-31" "2006-12-31" "000001" "2005-07-31" "2007-12-31" "000001" "2005-08-19" "2005-12-31" "000001" "2005-08-19" "2006-12-31" "000001" "2005-08-19" "2007-12-31" "000001" "2005-09-29" "2005-12-31" "000001" "2005-09-29" "2006-12-31" "000001" "2005-11-01" "2005-12-31" "000001" "2005-11-01" "2006-12-31" "000001" "2005-11-01" "2007-12-31" "000001" "2005-11-06" "2006-12-31" "000001" "2005-11-06" "2007-12-31" "000001" "2005-11-06" "2008-12-31" "000001" "2006-01-11" "2005-12-31" "000001" "2006-01-11" "2006-12-31" "000001" "2006-02-14" "2005-12-31" "000001" "2006-02-22" "2005-12-31" "000001" "2006-02-22" "2006-12-31" "000001" "2006-03-08" "2005-12-31" "000001" "2006-03-08" "2006-12-31" "000001" "2006-04-04" "2006-12-31" "000001" "2006-04-04" "2007-12-31" "000001" "2006-04-04" "2008-12-31" "000001" "2006-04-10" "2006-12-31" "000001" "2006-04-10" "2007-12-31" "000001" "2006-04-19" "2006-12-31" "000001" "2006-04-19" "2007-12-31" "000001" "2006-04-27" "2006-12-31" "000001" "2006-04-27" "2007-12-31" "000001" "2006-04-27" "2008-12-31" "000001" "2006-05-28" "2006-12-31" "000001" "2006-05-28" "2007-12-31" "000001" "2006-05-30" "2006-12-31" "000001" "2006-05-30" "2007-12-31" "000001" "2006-06-12" "2006-12-31" "000001" "2006-06-12" "2007-12-31" "000001" "2006-06-12" "2008-12-31" "000001" "2006-06-15" "2006-12-31" "000001" "2006-06-15" "2007-12-31" "000001" "2006-07-04" "2006-12-31" "000001" "2006-07-04" "2007-12-31" "000001" "2006-08-17" "2006-12-31" "000001" "2006-08-17" "2007-12-31" "000001" "2006-08-23" "2006-12-31" "000001" "2006-08-23" "2007-12-31" "000001" "2006-08-23" "2008-12-31" "000001" "2006-10-13" "2006-12-31" "000001" "2006-10-13" "2007-12-31" "000001" "2006-10-26" "2006-12-31" "000001" "2006-10-26" "2007-12-31" "000001" "2006-10-27" "2006-12-31" "000001" "2006-10-27" "2007-12-31" "000001" "2006-10-27" "2008-12-31" "000001" "2006-11-06" "2006-12-31" "000001" "2006-11-06" "2007-12-31" "000001" "2006-11-06" "2008-12-31" "000001" "2007-02-05" "2006-12-31" "000001" "2007-02-05" "2007-12-31" "000001" "2007-02-05" "2008-12-31" "000001" "2007-03-22" "2007-12-31" "000001" "2007-03-22" "2007-12-31" "000001" "2007-03-22" "2007-12-31" "000001" "2007-03-22" "2008-12-31" "000001" "2007-03-22" "2008-12-31" "000001" "2007-03-22" "2009-12-31" "000001" "2007-03-23" "2007-12-31" "000001" "2007-03-23" "2008-12-31" "000001" "2007-03-23" "2009-12-31" "000001" "2007-05-16" "2007-12-31" "000001" "2007-05-17" "2007-12-31" "000001" "2007-06-19" "2007-12-31" "000001" "2007-06-19" "2008-12-31" "000001" "2007-06-19" "2009-12-31" "000001" "2007-06-20" "2007-12-31" "000001" "2007-06-20" "2008-12-31" "000001" "2007-06-20" "2009-12-31" "000001" "2007-08-15" "2007-12-31" "000001" "2007-08-15" "2008-12-31" "000001" "2007-08-16" "2007-12-31" "000001" "2007-08-16" "2008-12-31" "000001" "2007-08-17" "2007-12-31" "000001" "2007-08-17" "2008-12-31" end
0 Response to How can I get difference between two dates in days
Post a Comment