Java Date to String dateToBOMCStrDate(Date date)

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

Description

date To BOMC Str Date

License

Apache License

Declaration

public static String dateToBOMCStrDate(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 dateToBOMCStrDate(Date date) {
        try {/*from w  w  w  .ja va 2 s  .  c  o m*/
            SimpleDateFormat simpledateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            String s = simpledateformat.format(date);
            s = StrToBOMCStrDate(s);
            return s;
        } catch (Exception e) {
            return "";
        }
    }

    public static String StrToBOMCStrDate(String date) {
        return date.replace(" ", "T");
    }
}

Related

  1. datetime(Date date)
  2. dateTime2String(Date dateTime, DateFormat dateFormat)
  3. dateTimeISO(final java.util.Date date)
  4. dateTimeToZero(Date date)
  5. dateTo14String(Date date)
  6. dateToCalendar(Date fecha, String formato)
  7. dateToDateString(Date date, Locale locale)
  8. dateToDDMMYYYYStr(Date dateTime)
  9. dateToDefaultDateString(Date date)