Java Date to String dateToOracleDateString(Date date)

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

Description

date To Oracle Date String

License

Apache License

Declaration

public static String dateToOracleDateString(Date date) 

Method Source Code


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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String dateToOracleDateString(Date date) {
        System.out.println("To Oracle Date; [" + formatDate(date, "dd-MMM-yy") + "]");
        return formatDate(date, "dd-MMM-yy");
    }/*from ww w.j av  a 2 s.  c  o  m*/

    public static String formatDate(Date date, String dateFormat) {
        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
        return sdf.format(date);
    }
}

Related

  1. dateToHuman(Date date)
  2. DateToInteger(Date date)
  3. dateToIso(Date d)
  4. dateToIso8601String(Date date)
  5. dateToISODate(Date date)
  6. dateToRelativeTime(Date date)
  7. dateToRFC1123(Date date)
  8. dateToRFC3339(Date d)
  9. dateToStr(Date date)