Java Date to Timestamp getJnlpTimestamp(Date date)

Here you can find the source of getJnlpTimestamp(Date date)

Description

get Jnlp Timestamp

License

Apache License

Declaration

public static String getJnlpTimestamp(Date date) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static final String JNLP_TIMESTAMP_PREFIX = "TS: ";
    public static final String JNLP_TIMESTAMP_DATETIME_FORMAT = "YYYY-MM-DD hh:mm:ss";

    public static String getJnlpTimestamp(Date date) {
        final SimpleDateFormat dateFormat = new SimpleDateFormat(JNLP_TIMESTAMP_DATETIME_FORMAT);

        return JNLP_TIMESTAMP_PREFIX + dateFormat.format(date);
    }//from  w ww  .  j  a  v a  2 s.c  o  m
}

Related

  1. getAsTimestampOrEmptyString(Date date)
  2. getAuditTimestamp(Date date)
  3. getDetailedTimeStamp(Date date)
  4. getDisplayableTimeStamp(Date timeStamp)
  5. getDisplayTimeStamp(Date date)
  6. getTimestamp(Date date)
  7. getTimestamp(Date date)
  8. getTimestamp(Date date)
  9. getTimestamp(Date date)