Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package neuro;
- public class Teste {
- public static void main(String[] args) {
- java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss.SSS");
- sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT -02:00"));
- java.util.Date date;
- try {
- date = sdf.parse("24/05/2018 16:59:56.289");
- System.out.println("Diferença em millisegundos: "+date.getTime());
- } catch (java.text.ParseException e1) {
- e1.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement