i am also using the date picker in a jsp, which prints the date as 2-2-2007. there is a problem with these date formats. date picker gives the date as 2-2-2007, but the java code gives the date prepending with 0. can you please help me. as there is a problem with executing the sql query.
there is a problem with these date formats. date picker gives the date as 2-2-2007, but the java code gives the date prepending with 0. can you please help me. as there is a problem with executing the sql query.
So can you please explain what you want exactly? Do you want Java to format the date without the leading zeroes? If that is what you want, then use the format "M-d-yyyy" instead of "MM-dd-yyyy".