I have a query that retrieve month from database but i want the single digit number to be pad with a leading zero.
this the query
select Month(date()) as [MONTH]
from TABLENAME
That is an immediate if statement, and it is checking to see if the month function returns a number less than 10. If it does, it prepends a zero (0) to the month, if not it simply returns the month value. HTH!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.