Get time difference in Java
UPDATED: 29 November 2011
Tags:
javaQuery API
Download API : https://sourceforge.net/projects/javaqueryapi/files/
Requirement : Date must be in Nov 29, 2011 6:54:56 PM in this format.
How to get date in this format?
String current_date = d.toLocaleString();
O/P
Nov 29, 2011 6:54:56 PM
javaQuery.core.TimeDifference
public class timed {
public static void main(String[] args) {
String test_date = "Nov 29, 2011 6:54:56 PM";
TimeDifference td = new TimeDifference();
System.out.println(td.GetDifference(test_date));
}
}
O/P
1 hour ago...
Tags:
javaQuery API
0 comments :