Here you can find the source of parseTimeStamp(final String... key)
public static Timestamp parseTimeStamp(final String... key) throws ParseException
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); public static Timestamp parseTimeStamp(final String... key) throws ParseException { final String dateStr = key[0] + "-" + key[1] + "-" + key[2] + " " + key[3] + ":" + key[4] + ":" + key[5]; return new Timestamp(format.parse(dateStr).getTime()); }// ww w .ja v a 2 s . c o m }