SG&A as a percentage of net sales increased 100 basis points in the quarter to 27.2%. The increase in both SG&A and SG&A as a percentage of net sales, is primarily due to the impact of acquisitions. Excluding acquisitions, SG&A for our base business decreased 1% during the quarter as we have taken steps to align our SG&A spend with our lower sales. For the third quarter, we recorded an income tax expense of approximately $18 million compared to $23 million in the prior year period. The effective tax rate was 23.4% for the third quarter of 2023, compared to 23.8% for the prior year period. The decrease in the effective tax rate was primarily due to an increase in the amount of excess tax benefits from stock-based compensation. We expect the 2023 fiscal year effective tax rate will be between 25% and 26%, excluding discrete items such as excess tax benefits.
Net income for the third quarter 2023 decreased to $57 million compared to $73 million for the same period in the prior year, as their higher net sales were more than offset by our lower gross margin and increased SG&A expense. Our weighted average diluted share account was $45.7 million compared to $45.8 million for the prior year period. Adjusted EBITDA decreased 12% to approximately $120 million for the third quarter compared to $136 million for the same period in the prior year. Adjusted EBITDA margin decreased 180 basis points to 10.5%, reflecting the lower gross margin. Now, I’d like to provide a brief update on our balance sheet and cash flow statement as shown on Slide 10. Net working capital at the end of the third quarter was $919 million, compared to $869 million at the end of the prior year period.
The increase in net working capital is primarily attributable to an increase in accounts receivable resulting from our sales growth, including acquisitions. Inventory levels were flat with prior year, and inventory turns improved as we continue to make progress on our supply chain initiatives. Operating cashflow decreased approximately $47 million to $89 million for the third quarter 2023, compared to approximately $136 million for the prior year period. The decrease in operating cash flow primarily reflects timing, as we started our seasonal inventory reduction earlier in 2023 compared to 2022. Year-to-date, operating cash flow increased $77 million to approximately $190 million. The 69% increase reflects our improved management of working capital.
We made cash investments of approximately $134 million for the third quarter, compared to approximately $66 million for the same quarter in 2022. The increase reflects our acquisition investments made during the quarter. Scott will provide additional details on the acquisitions later in the call. Capital expenditures were $8 million for the quarter, compared to $4 million in the prior year period due to greater investment in branch improvements, including relocations. In July, we borrowed an additional $120 million on our term loan, and used the proceeds to reduce borrowings on our ABL facility. As a result, at the end of the quarter, we had liquidity of approximately $588 million, which consisted of approximately $75 million cash on hand, and approximately $513 million in available capacity under our ABL facility.
Net debt at the end of the quarter was approximately $446 million compared to approximately $377 million at the end of the third quarter of 2022. The higher net debt reflects our increased acquisition investments. Leverage at the end of the third quarter was 1.1 times our trailing 12 months adjusted EBITDA, compared to 0.8 times in the prior year period. As a reminder, our target year-end net debt to adjusted EBITDA leverage range is one to two times. Our priority from a balance sheet and funding perspective is to maintain our financial strength and flexibility so we can execute our growth strategy in all market environments. I’ll now turn the call over to Scott for an update on our acquisition strategy.
Scott Salmon: Thanks, John. As shown on Slide 11, we acquired six companies in the third quarter for a combined trailing 12-month net sales of approximately $230 million, bringing our year-to-date total to 10 companies acquired, and approximately $300 million in trailing 12-month net sales. Since 2014, we have acquired 90 companies with approximately $1.8 billion in trailing 12-month net sales added to SiteOne. Turning to Slides 12 through 17, you’ll find information on our most recent acquisitions. On July 3rd, we acquired Hickory Hill Farm & Garden, a single location wholesale distributor of irrigation, nursery, and landscape supplies. The acquisition of Hickory Hill complements our existing business in the Lake Oconee Georgia area, allowing us to provide the full line of landscaping products to landscape professionals in this high growth local market.
On August 11, we acquired New England Silica, a single location wholesale distributor of hardscapes. The addition of New England Silica strengthens our leading Hardscapes position in Connecticut. On August 25, we acquired Timothy’s Center for Gardening, a single location distributor of hardscapes, landscape supplies, and nursery products, expanding the products we offer our customers in New Jersey and the Delaware Valley. On August 25, we also acquired Pioneer Landscape Centers, with 34 bulk landscape supplies distribution sites across Colorado and Arizona. This strategic acquisition establishes SiteOne as the leading bulk Landscape Supplies distributor in two of the 10 fastest growing States in the US. Also, on August 25, we acquired Regal Chemical, a wholesale distributor of agronomics products with one location in the Atlanta market.
The addition of Regal significantly expands our portfolio of agronomics products and services across the southeast. And lastly, on August 28, we acquired JMJ Organics, with five distribution locations, extending our leading Landscape Supplies and Nursery presence across the greater Houston area. Our acquisitions continue to add terrific talent to SiteOne, and move us forward toward our goal of providing a full line of Landscape products and services to our customers in all major US and Canadian markets. Summarizing on Slide 18, our acquisition strategy continues to create significant value for SiteOne. With a strong balance sheet and a robust pipeline across all lines of business and geographies, we are confident that we’ll be able to continue adding more outstanding companies to SiteOne over the coming years.