Java Long Number to Time formatXSDateTime(long lastModified)

Here you can find the source of formatXSDateTime(long lastModified)

Description

format XS Date Time

License

BSD License

Declaration

public static String formatXSDateTime(long lastModified) 

Method Source Code

//package com.java2s;
//The contents of this file are subject to the "Simplified BSD License" (the "License");

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final String sXSDT_FORMAT_STR = "yyyy-MM-dd'T'HH:mm:ss";

    public static String formatXSDateTime(Date date) {
        // YYYY-MM-DDThh:mm:ss
        return (new SimpleDateFormat(sXSDT_FORMAT_STR)).format(date);
    }//  ww  w.  ja va  2  s . c o  m

    public static String formatXSDateTime(long lastModified) {
        Date date = new Date(lastModified);
        return formatXSDateTime(date);

    }
}

Related

  1. formattaData(long date)
  2. formatTime(long date)
  3. formatTime(long ms)
  4. formatTimestampLong(long timestamp, String datepattern, TimeZone tz)
  5. formatToUTC(long datetime)
  6. getAmPm(long time)
  7. getCollectTimeInLong(Date date)
  8. getDelay(long delay, long interval)
  9. getDT(long mills)