Java Hour Format formatXsdDate (final Date date)

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

Description

format Xsd Date

License

Apache License

Declaration

public static String formatXsdDate (final Date date)
    

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String formatXsdDate(final Date date) {
        return getXsdDateFormat().format(date);
    }/*w w  w. j ava 2 s . com*/

    private static SimpleDateFormat getXsdDateFormat() {
        // NB don't share instances - not threadsafe.
        return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    }
}

Related

  1. formatW3CDateTime(Date date)
  2. formatWCPDate(String date, String sFormat)
  3. formatWithAge(Date date, String dateFormat, String suffix)
  4. formatWithSql92Date(Date date)
  5. formatXEP0082Date(Date date)
  6. formatXsdDateTime(Date d)
  7. getFormattedHoursByMinutes(int minutes)
  8. getHHmm()
  9. getHHMM(Date date)