RE: [EpiData-list] help with week + year combination
It works perfectly. Thanks very much.
-----Original Message----- From: epidata-list-bounces@lists.umanitoba.ca [mailto:epidata-list-bounces@lists.umanitoba.ca] On Behalf Of epidata-list@lists.umanitoba.ca Sent: Tuesday, October 17, 2006 4:16 PM To: epidata-list@lists.umanitoba.ca Subject: Re: [EpiData-list] help with week + year combination
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"
_______________________________________________ EpiData-list mailing list EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list
participants (1)
-
epidata-list@lists.umanitoba.ca