cylly,
First cast both of your integer variables to strings :
strDateMonth = "" + DateMonth;
(I dunno if strDateMonth = (String) DateMonth would work, it works in java, dunno about javascript, just do it the above way to be safe)
Then check for the length of the strings, don't want to put a leading zero if it's 10, 11, or 12:
if (strDateMonth.length == 1) {
}
And inside the if block just use string concatenation to stick the zero on the front:
strDateMonth = "0" + strDateMonth;
that should do it
-kaht