i,

I am trying to work with dates - specifically getting the mean interval in days between two dates. But I am having difficulty getting the results displayed in "days"

I import my data from excel containing ID and and five date-variables

Code:
. import excel DCCG_oprenset_aktuel.xlsx, firstrow clear sheet(R2.2)
(60 vars, 1,078 obs)

. 
. gen hgb_0_date=date(samlethgb_datotættestpådiagn,"DMY")
(283 missing values generated)

. format %td hgb_0_date

. gen hgb_1_date=date(hgb_datotættestpåindenoper,"DMY")
(246 missing values generated)

. format %td hgb_1_date

. 
. gen ferritin_0_date=date(samletferritin_datotættestpå,"DMY")
(382 missing values generated)

. format %td ferritin_0_date 

. gen ferritin_1_date=date(ferritin_datotættestpåinden,"DMY")
(356 missing values generated)

. format %td ferritin_1_date

. 
. rename Op_dato op_date
to get an overview I describe my data and afterward generates "_dif" variables expressing the difference between the operation date "op_date" and the hgb_0 and ferritin_0 _dates respectively.

Code:
. describe hgb_0_date hgb_1_date ferritin_0_date ferritin_1_date op_date 

              storage   display    value
variable name   type    format     label      variable label
---------------------------------------------------------------------------------------------------------------
hgb_0_date      float   %td                   
hgb_1_date      float   %td                   
ferritin_0_date float   %td                   
ferritin_1_date float   %td                   
op_date         int     %td                   Op_dato

. 
. gen hgb_dif = op_date - hgb_1_date if(hgb_1_date!=hgb_0_date)
(475 missing values generated)

. gen fer_dif = op_date - ferritin_1_date if(ferritin_1_date!=ferritin_0_date) 
(953 missing values generated)

. sum hgb_dif fer_dif

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     hgb_dif |        603    6.903814    17.94058          0        378
     fer_dif |        125    3749.624    12064.02          0      43268
With the last command I intend to get a mean expressed in days. That succeds for the variable "hgb_dif" but not for "fer_dif". I cant figure out why - any advice?

Magnus