看板 Statistics 關於我們 聯絡資訊
data qq; input date; cards; 20071001 20071002 20071003 20071004 20071005 20071006 20071007 ; run; data qq2; set qq; date_b=input(put(date,8.),yymmdd8.); w=weekday(date_b); run; /* The WEEKDAY function produces an integer that represents the day of the week, where 1=Sunday, 2=Monday, . . . , 7=Saturday. */ 我猜你一定是沒給黃色那行指令... ※ 引述《moli1984 (ME LLAMO VICENTE)》之銘言: : 我有一筆報酬率的資料 想要檢定是否存在週末效應 : raw data的日期格式是yymmdd : 老師告訴我的指令是 : w=weekday(date); : if w=1 then dummyvariable=1; : 可是我試了很多次還是無法用日期求出當日是星期幾? : 是我指令錯誤? 還是日期的格式錯誤? : 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.231.73.111