[EpiData-list] help with week + year combination

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Oct 17 06:16:02 CDT 2006


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"





More information about the EpiData-list mailing list