Java Date Now getCurrentTimestampAsISOString()

Here you can find the source of getCurrentTimestampAsISOString()

Description

get Current Timestamp As ISO String

License

Open Source License

Declaration

public static String getCurrentTimestampAsISOString() 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private static final SimpleDateFormat TIMESTAMP_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");

    public static String getCurrentTimestampAsISOString() {

        return getDateAsISOTimestampString(new Date());
    }//from  w  ww .j  a v a 2  s  .  co  m

    public static String getDateAsISOTimestampString(Date timestamp) {

        return TIMESTAMP_FORMAT.format(timestamp);
    }
}

Related

  1. getCurrentTimeStamp()
  2. getCurrentTimestamp()
  3. getCurrentTimestamp()
  4. getCurrentTimeStamp()
  5. getCurrentTimestamp()
  6. getCurrentTimestampString()
  7. getCurrentTimeStr()
  8. getCurrentTimeStr()
  9. getCurrentTimeString(String format)