It really helped. Thanks a lot ;) -- Regards, italPASTA > test for the length of the string: if it's less than 2, prepend a zero: > > <code> > if (nmonth.toString().length < 2) nmonth = "0" + nmonth.toString(); > </code> > > should do the trick.