Java Date to String dateToIso(Date d)

Here you can find the source of dateToIso(Date d)

Description

date To Iso

License

LGPL

Declaration

public static String dateToIso(Date d) 

Method Source Code


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

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import java.util.Date;
import java.util.Locale;

public class Main {
    private static final DateFormat ISO_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd", Locale.GERMAN);

    public static String dateToIso(Date d) {
        return ISO_DATE_FORMAT.format(d);
    }//from  w w w . j  ava 2  s .  c  o  m
}

Related

  1. dateToHHmmStr(Date date)
  2. dateToHMTime(Date date)
  3. dateToHttpDateString(Date d)
  4. dateToHuman(Date date)
  5. DateToInteger(Date date)
  6. dateToIso8601String(Date date)
  7. dateToISODate(Date date)
  8. dateToOracleDateString(Date date)
  9. dateToRelativeTime(Date date)