Java Timestamp convertTS2HHMM(Timestamp timeStamp)

Here you can find the source of convertTS2HHMM(Timestamp timeStamp)

Description

RBC CMD 1.0 This method is used to Convert Timestamp to HHMM(HoursMinutes)

License

Open Source License

Parameter

Parameter Description
timeStamp a parameter

Declaration

public static String convertTS2HHMM(Timestamp timeStamp) 

Method Source Code

//package com.java2s;
/*//from   w w w . j a va2s  .c  o  m
 * @(#)ConversionUtil.java
 *
 * Copyright by ObjectFrontier, Inc.,
 * 12225 Broadleaf Lane, Alpharetta, GA 30005, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of ObjectFrontier, Inc. You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of
 * the license agreement you entered into with ObjectFrontier.
 */

import java.sql.Timestamp;

import java.text.SimpleDateFormat;

public class Main {
    protected static SimpleDateFormat onlyHHMM = new SimpleDateFormat("HHmm");

    /**
     * RBC CMD 1.0
     * This method is used to Convert Timestamp
     * to HHMM(HoursMinutes)
     * @param timeStamp
     * @return
     */
    public static String convertTS2HHMM(Timestamp timeStamp) {

        return onlyHHMM.format(timeStamp);
    }
}

Related

  1. calToTimeStamp(Calendar cal)
  2. changeDate(Timestamp date, Integer amount, Integer unit)
  3. checkTimestamp(String sval)
  4. clone(Timestamp original)
  5. concatDateAndTime(Timestamp date, Time time)
  6. copyOrCreateTimestampNullsafe(Date date)
  7. createDateTimestamp(java.util.Date date)
  8. date2Timestamp(Date date)
  9. date2Timestamp(Date value)