Announcement

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

  • Why stata show wrong date after changing format

    Dear Stata user,

    I'm exporting excel into stata, and when I export, the date change from format from 17/01/1985 to 31064, but when I use format varname %tddd/nn/CCYY, it is changed to 18jan2045. Other examples include 06/12/1985-7/12/2045-31387, 04/02/1986-5/2/2046-31447. It seems now the years are 30 yrs more than the actual one. Does anyone knows why this is the case? Is there a way to change it? (like can I add a number equal to 30 yrs, or change the start year directly?)

    Thank you so much!


  • #2
    Read https://blog.stata.com/2011/01/05/us...ther-software/

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      Thanks a lot Andrew! I learned from it that excel is using 1900 date system, that is why all the things happen
      Thanks again

      Comment

      Working...
      X