Java Date Format ISO formattedIso8601DateString(Calendar pCal)

Here you can find the source of formattedIso8601DateString(Calendar pCal)

Description

formatted Iso Date String

License

Open Source License

Declaration

public static String formattedIso8601DateString(Calendar pCal) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static String formattedIso8601DateString(Calendar pCal) {
        Date date = pCal.getTime();
        String result = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(date);

        return result + "Z";
    }/* w w w .  j av a  2 s  .  c om*/
}

Related

  1. formatIso8601ForCCTray(Date date)
  2. formatIsoDate(Date date)
  3. formatISODate(Date date)
  4. formatISODateTime(Date date)
  5. formatOneDecimal(int iNumber, int iDivisor)
  6. formatTimestampIso8601(long millis, TimeZone zone)
  7. formatToIso8601(Date d)
  8. formatToISO8601(Date date)
  9. formatWikiISO8601(Date d)