How can I set the localization so that java.util.Date have the German format? ( ie: dd.mm.yyyy ) . I need to send to a Webservice a Date(), but it can be only on this format. Not as String but as a Date Object.
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A java.util.Date doesn’t have a format. The format only comes into play when you parse a String as a Date or format a Date for display. Internally the date is just a long.
To format an instance of a Date object as a String you can use the SimpleDateFormat class in java.text