Java Timestamp from convertString2TimeStamp(String dateString)

Here you can find the source of convertString2TimeStamp(String dateString)

Description

convert String Time Stamp

License

Open Source License

Declaration

public static Timestamp convertString2TimeStamp(String dateString) throws ParseException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Main {
    public static Timestamp convertString2TimeStamp(String dateString) throws ParseException {
        return new Timestamp(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").parse(dateString).getTime());

    }//  w  w w.  j av  a 2 s. c o m
}

Related

  1. convertDateStringToTimestamp(String dateString, String format)
  2. convertDateToTimestamp(Date date)
  3. convertDateToTimestamp(java.util.Date date)
  4. convertLongToTimestamp(Long millSec)
  5. convertSQLTimestamp(String s, String formatIn, String formatOut)
  6. convertString2Timestamp(String value)
  7. convertStringDateToTimestamp(String sDate, String dateformat)
  8. convertStringToTimeStamp(String date)
  9. convertStringToTimestamp(String str)