Java Date Format As formatDateToUTC(final Date date)

Here you can find the source of formatDateToUTC(final Date date)

Description

format Date To UTC

License

Open Source License

Declaration

public static String formatDateToUTC(final Date date) 

Method Source Code

//package com.java2s;

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.*;

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

    public static String formatDateToUTC(final Date date) {
        DateFormat simpleDateFormat = new SimpleDateFormat(DATE_UTC_FORMAT,
                Locale.US);//www  .  j ava  2 s  . com
        return simpleDateFormat.format(date) + "Z";
    }
}

Related

  1. formatDateToday()
  2. formatDateToDefault(Date date)
  3. formatDateToMD(Date date)
  4. formatDateToMinutes(Date date)
  5. formatDateToUTC(Date date)
  6. formatDateUsingW3C(Date date)
  7. formatDateUTC(Date d)
  8. formatDateUTC(Date date)
  9. formatDateW3C(Date date)