Java Millisecond Format reverseFormattedDateWithMilliseconds()

Here you can find the source of reverseFormattedDateWithMilliseconds()

Description

reverse Formatted Date With Milliseconds

License

Open Source License

Declaration

public static String reverseFormattedDateWithMilliseconds() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static String reverseFormattedDateWithMilliseconds() {

        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, 1);
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        String formatted = format.format(cal.getTime());
        assert (formatted != null);
        return formatted;

    }// ww w  .j  a v a  2 s  . c  om
}

Related

  1. parseDate(long millisec, String format)
  2. prettyPrintMillis(long millis)
  3. prettyPrintMillis(long millis)
  4. prettyPrintTime(long millis)
  5. printDate(long millis)
  6. stringToTimestampInMilliseconds(String s, DateFormat formatter)
  7. strToDateMillisTimestamp(String dateStr, String formatStr)
  8. timeFormat(final long milliseconds)
  9. timeMillisToString(long timeMillis, String dateFormat)