Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sum command for dates in stata

    Can you obtain the detailed summary of dates in stata as actual dates rather than the numbers that represent dates in stata?
    The summarise command provides numbers which you then need to calculate using other stata commands back to determine what day, month year they are which takes time. Is there any straight 'display date format' option with the summarise command?

  • #2
    Code:
    . clear 
    
    . set seed 2803 
    
    . set obs 100
    Number of observations (_N) was 0, now 100.
    
    . gen rdate = runiformint(20000, 22000)
    
    . format rdate %td
    
    . ssc install summdate
    
    . summdate rdate
    
    Number of obs               100
    Mean date              15jul2017
    Minimum date           22oct2014
    Maximum date           15mar2020
    SD                      600.546
    
    .

    Comment

    Working...
    X