Never try to be a hard-worker. Be a smart-worker.
My Blog
Regards, Rene Larsen
Regards, Rene Larsen
Originally posted by Rene Larsen:
What DO the input dates look like?? are they in the format "yyyy-MM-dd"??
Never try to be a hard-worker. Be a smart-worker.
My Blog
Regards, Rene Larsen
Originally posted by Rene Larsen:
Well then you have answered your own question...
"yyyy/MM/dd" and "yyyy-MM-dd" don't have the same format.
Never try to be a hard-worker. Be a smart-worker.
My Blog
Regards, Rene Larsen
Originally posted by Rene Larsen:
You are getting the ParseException when you call "DATE_FORMAT.parse(..)" with a date format different from the one you have configured DATE_FORMAT (SimpleDateFormat object) with, which has the format "yyyy-MM-dd" - and you said that your input date has the format "yyyy/MM/dd"
These two date formats are not the same - and they have to.
Never try to be a hard-worker. Be a smart-worker.
My Blog
Regards, Rene Larsen
Never try to be a hard-worker. Be a smart-worker.
My Blog
Regards, Rene Larsen
Originally posted by Rene Larsen:
You need to use the SimpleDateFormat object - or a new one with another pattern, and then use the 'format(java.util.Date)' method instead.
To get a 'java.util.Date' from a 'java.sql.Date', you can do it like this
Never try to be a hard-worker. Be a smart-worker.
My Blog
Consider Paul's rocket mass heater. |