Java Date Parse convertTFormatToCDATime(String tDate)

Here you can find the source of convertTFormatToCDATime(String tDate)

Description

convert T-format date to CDA format date.

License

Open Source License

Parameter

Parameter Description
tDate a parameter

Declaration


public static String convertTFormatToCDATime(String tDate) throws Exception 

Method Source Code


//package com.java2s;
import java.text.DateFormat;

import java.util.Date;
import java.util.Calendar;

public class Main {
    private static DateFormat cdaDateFormat = null;

    /**/*ww w. j a  v  a  2 s  .  co m*/
     * 
     * convert T-format date to CDA format date.
     * 
     * 
     * 
     * @param tDate
     * 
     * @return
     */

    public static String convertTFormatToCDATime(String tDate) throws Exception {

        if (tDate == null || tDate.length() < 0)

            return null;

        // today date

        if (tDate.equalsIgnoreCase("T"))

            convertToCDATime(Calendar.getInstance().getTime());

        throw new Exception("Need to be implemented!");

    }

    public static String convertToCDATime(Date date) {

        return cdaDateFormat.format(date);

    }
}

Related

  1. convertStringToTime(String date, String pattern)
  2. convertStrToDate(String dateStr, String dateFormat)
  3. convertStrToDate(String day)
  4. convertStrToDate(String s, String format)
  5. convertStrToDate(String source)
  6. convertTimeInMillisecondsToDate(long timeInMilliseconds)
  7. convertTimeStampToDate(String dateString, String srcFormat, String destFormat)
  8. convertTimestampToDateTime(Long timestamp, Boolean withSeconds)
  9. convertTimeZonesToDate(String fromTimeZone, String toTimeZone, DateTime fromDateTime)