© 2024 fjorge. All rights reserved.
How do I select month with leading zeroes in T-SQL
![](https://cdn.prod.website-files.com/66170974d53f5061ec8f72ec/663e6812de1b5491cb1bdd30_Blog%20Image%209.jpg)
SQL Server doesn't provide leading zeroes in a month selection, so you'll have to add them yourself. The easiest way to do this is probably to create a two- or three-digit string and taking a RIGHT() substring to select the rightmost two digits.
Example:
Ready to start a project?
We build systems that turn complex problems into simple solutions, making it easier for you to run your business.