Here you can find the source of dateToBOMCStrDate(Date date)
public static String dateToBOMCStrDate(Date date)
//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"); } }