I am building a form that allows a user to select two dates(input boxes)in which to perform a search on. The users entered criteria will always be formatted to the MM/dd/yyyy format. However, in order for my query to work I need to format the date as follows: yyyy/MM/dd.
Otherwise I get the following exception:
I have googled, search SDN forums and here but I haven't found the solution to my problem.
I have tried the following in my
servlet(from examples online):
What I dont understand is the out print lines I am logging which are as follows:
Which API should I be looking at? It seems like I need to use both java.text.SimpleDateFormat and java.text.DateFormat or perhaps one or the other. Why are my print outs so completely off my actual input dates? And is there a way to format a date
string from MM/dd/yyyy to date yyyy/MM/dd?
I would appreciate any clarification on the above issues.
Thanks in advance - regards,
Crystal Bazil
[ December 09, 2005: Message edited by: Crystal Bazil ]