BASH: SED/AWK A Variable

Hi Im wondering how to extract data from a variable. I have a variable that contains YYYYMMDD, something like 20091013. Can I extract the year, YYYY, to varA, the month, MM, to varB and the day, DD to vabC?