Additionally, the company does not authorize the reproduction or dissemination of transcripts or audio recordings of the company's quarterly conference calls without its expressed written consent. Any unauthorized reproduction or recording of the call shouldn't be relied upon, as the information may be inaccurate.
At this time, this conference is being recorded. And I would now like to turn the conference over to our host, Karen Rhoads. Please go ahead.
Karen B. Rhoads
Thank you. Good morning, everyone, and thank you for joining the call. Our August 16, 2012 press release reported that net income for the second quarter that ended July 28, 2012 was $23.2 million or $0.49 per share on a diluted basis. That was down 1.4% from net income of $23.6 million or $0.50 per share on a diluted basis for the prior year second quarter that ended July 30, 2011. Our year-to-date net income for the 26-week period that ended July 28, 2012 was $61 million or $1.28 per share on a diluted basis, which was up 7% from net income of $57 million or $1.21 per share on a diluted basis for the 26-week period that ended July 30, 2011.
Our net sales for the 13-week second quarter increased 1.5%, to $215.5 million compared to net sales of $212.4 million for the prior year second quarter. Comparable store sales for the quarter decreased just 0.8%, and online sales, which are not included in comparable store sales, increased 12.1%, to $16.0 million.
Net sales for the 26-week year-to-date period increased 5.9%, to $479.2 million compared to net sales of $452.5 million for the same period in the prior year.
Comparable store sales for the year-to-date period increased 3.6%, and online sales, which again are not included in comparable store sales, increased 13.7%, to $35.7 million. Gross margin for the quarter was 40.1%, down approximately 90 basis points from 41% for the second quarter last year. The decline was driven by the deleveraging of certain buying, occupancy and distribution costs, which had about a 75 basis point impact and by a 25 basis point reduction in merchandise margins, which were partially offset by a reduction in expense related to our incentive bonus accrual.