Java Year Format get_Oracle_DateString_YYYYMMdd_HHmmss(java.util.Date date)

Here you can find the source of get_Oracle_DateString_YYYYMMdd_HHmmss(java.util.Date date)

Description

ge Oracl Date StrinYYYYM MdH Hmmss

License

Apache License

Declaration

static public String get_Oracle_DateString_YYYYMMdd_HHmmss(java.util.Date date) 

Method Source Code

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

import java.text.*;

public class Main {
    static public SimpleDateFormat YYYYMMdd_HHmmss = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");

    static public String get_Oracle_DateString_YYYYMMdd_HHmmss(java.util.Date date) {
        if (date == null)
            return "NULL";
        String dateString = "'" + YYYYMMdd_HHmmss.format(date) + "'";
        return "TO_DATE(" + dateString + ", 'YYYY.MM.DD HH24:MI:SS')";
    }/*from  ww w  .j  a va 2  s.c om*/
}

Related

  1. formatYear(Date date)
  2. formatYear(Date date)
  3. formatYearMonth(Date date)
  4. formatYyyyMm(Date date)
  5. formatyyyyMMddHHmmss(long time)
  6. getDDMMYYY_HHMM()
  7. getDDMMYYYYDate(Date date)
  8. getFirstDate(String yearMonthStr, String yearMonthFormat, String dateFormat)
  9. getFormatToDateSimple(String yyyyMMdd)