17 Oct
2006
17 Oct
'06
1:16 p.m.
Small change to your code below. Will that work? Jamie
I am hoping I can get some help with epidata and use of year and week.
Before file DEFINE WEEKS ## DEFINE YEARS #### DEFINE WEEK ####.## end DATEFROM MUSTENTER AFTER ENTRY LET WEEKS = WEEKNUM(DATEFROM) + 1 LET YEARS = YEAR(DATEFROM) LET WEEK = float(YEARS)+float(WEEKS)/100 END END
If you want WEEK as a string, try:
let week = string(years)+"-"+copy(string(100+weeks),2,2) (week is a string of length 7) This will yield WEEK like the following "2006-01" "2006-52"