Java Hour Format formatDateTime(Date date)

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

Description

format Date Time

License

Apache License

Declaration

static String formatDateTime(Date date) 

Method Source Code


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

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

public class Main {
    static String formatDateTime(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
        sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
        return sdf.format(date);
    }/*from  w  w w .j a  v  a 2  s .com*/
}

Related

  1. formatDateTime(Date d)
  2. formatDateTime(Date d)
  3. formatDateTime(Date d)
  4. formatDateTime(Date d)
  5. formatDateTime(Date date)
  6. formatDatetime(Date date)
  7. formatDateTime(Date date)
  8. formatDateTime(Date date)
  9. formatDateTime(Date date)