SimpleDateFormat
sdf=new SimpleDateFormat("dd/MM/YYYY hh:mm:ss");
String dateString=sdf.format(date);
It will give the output 28/09/2013 09:57:19
as you expected.
More Related Contents:
- My temp conversion program
- Where is the getInputStream() function in java 1.8?
- Overloaded method selection based on the parameter’s real type
- How to directly initialize a HashMap (in a literal way)?
- In Java, what does NaN mean?
- Collect successive pairs from a stream
- ‘Must Override a Superclass Method’ Errors after importing a project into Eclipse
- How to set the java.library.path from Eclipse
- JFrame in full screen Java
- Java: how can I split an ArrayList in multiple small ArrayLists?
- Why can not I add two bytes and get an int and I can add two final bytes get a byte?
- How to convert 24 hr format time in to 12 hr Format?
- Eclipse – debugger doesn’t stop at breakpoint
- Unit testing with mockito for constructors
- can’t cast to implemented interface
- String Deduplication feature of Java 8
- How to make a “fat jar” of a Maven project? [duplicate]
- How to disable SSL certificate checking with Spring RestTemplate?
- Multipart File upload Spring Boot
- stream on JPA lazy list
- Java: How to draw non-scrolling overlay over ScrollPane Viewport?
- How do annotations like @Override work internally in Java?
- Android SimpleDateFormat, how to use it?
- Java JFrame .setSize(x, y) not working?
- Does Java 8 provide a good way to repeat a value or function?
- What is a stack map frame
- How to log all active properties of a spring boot application before the beans instantiation?
- How to remove a task from ScheduledExecutorService?
- How to select the Date Picker In Selenium WebDriver
- Does Apache Commons HttpClient support GZIP?