Announcement

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

  • why i can't convert from yyyy/mm/dd to time

    hello
    i have variable for time like this :

    Day (variable name)
    2011/12/01
    2011/12/02
    2011/12/03
    .
    .
    2019/01/29

    i want to convert this string variable to time for xtset
    so, i did typing

    gen Day2 = date(Day,"ymd")

    but, i can't get any values
    only get " . " in all cell
    Click image for larger version

Name:	AA.png
Views:	1
Size:	120.9 KB
ID:	1489604

    what is problem?

  • #2
    Stata commands are case sensitive. You need:
    Code:
    gen Day2 = date(Day,"YMD")

    Comment


    • #3
      Sarah thank a lot :D

      Comment

      Working...
      X