Date doesn't have a format - essentially it's a number. What is your goal?
Main Topics
Browse All TopicsHi
I have the value which is string i want to convert the String value in dd/MM/yyyy date format ,
Eg:
String value 2009-11-15 00:00:00.0
i want to convert this !!
how can i do that ??
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Use the following program
import java.text.SimpleDateFormat
import java.util.Date;
public class DateFormat
{
public static void main(String[] args)
{
try
{
String dateval = "2009-11-15 00:00:00";
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-
Date date = format1.parse(dateval);
//System.out.println(date.
SimpleDateFormat format2 = new SimpleDateFormat("dd/MM/yy
String dateval2 = format2.format(date);
System.out.println(dateval
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Let me know if this was helpful
Try below if it helps:
public static void main(String[] args) throws ParseException {
String myDate = "2009-11-15 00:00:00.0";
String dateformat = "yyyy-MM-dd HH:MM:ss.S";
SimpleDateFormat sdf = new SimpleDateFormat(dateforma
Date parsedDate = sdf.parse(myDate);
String dateFormat1 = "dd/MM/yyyy";
SimpleDateFormat sdf1 = new SimpleDateFormat(dateForma
String date = sdf1.format(parsedDate);
System.out.println(date);
}
Business Accounts
Answer for Membership
by: dravidnsrPosted on 2009-11-02 at 06:04:41ID: 25719330
the string value is should be date only !!