Created
July 12, 2016 14:33
-
-
Save HennIdan/7ffb627fbbaf45b927276716ceacb99e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws ParseException { | |
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
String str3 = "1927-12-31 23:54:07"; | |
String str4 = "1927-12-31 23:54:08"; | |
Date sDt3 = sf.parse(str3); | |
Date sDt4 = sf.parse(str4); | |
long ld3 = sDt3.getTime() /1000; | |
long ld4 = sDt4.getTime() /1000; | |
System.out.println(ld4-ld3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment