i get a date value from My sql database(the field name start_date with data type "date").Also i insert the date value in following format yyyy-mm-dd format.i want to display in mm-dd-yyyy format .
i display the date value in the following format 2008-10-22 00:00:00.0.i want onlu mm-dd-yyyy format .please help
Hi there, welcome to Java ranch. This question probably belongs in the Beginners Forum (and if you search there you'll find many answers to this question) but regardless of that:
Look at the DateFormat class(es) in particular SimpleDateFormat, you'll quickly see what to use.
i get a date value from My sql database(the field name start_date with data type "date").Also i insert the date value in following format yyyy-mm-dd format.i want to display in mm-dd-yyyy format .
i display the date value in the following format 2008-10-22 00:00:00.0.i want onlu mm-dd-yyyy format .please help
Yes that's right!!!
You can achieve this by using SimpleDateFormat class and pass whatever format you want in it's constructor
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Gift giving made easy with the permaculture playing cards