The definition for epi-week is the following:
"The first epi week of the year ends, by definition, on the first Saturday of January, as long as it falls at least four days into the month. Each epi week begins on a Sunday and ends on a Saturday."
Ref: 1
I implemented them in server language (C#/Java) but my problem is to return a epi week and epi year from a SQL Server stored procedure
Find EpiWeek:
Find EpiYear: