Here you can find the source of toTimestamp(final String pValue)
Parameter | Description |
---|---|
pValue | the value |
public static Timestamp toTimestamp(final String pValue)
//package com.java2s; import java.sql.Timestamp; public class Main { /**/*from w w w . j av a2 s .c o m*/ * Converts the string to a jdbc Timestamp, using the standard Timestamp * escape format. * * @param pValue the value * @return a new {@code Timestamp} * @see java.sql.Timestamp * @see java.sql.Timestamp#valueOf(String) */ public static Timestamp toTimestamp(final String pValue) { // Parse date using default format return Timestamp.valueOf(pValue); } /** * Returns the value of the given {@code Object}, as a {@code String}. * Unlike String.valueOf, this method returns {@code null} * instead of the {@code String} "null", if {@code null} is given as * the argument. * * @param pObj the Object to find the {@code String} value of. * @return the String value of the given object, or {@code null} if the * {@code pObj} == {@code null}. * @see String#valueOf(Object) * @see String#toString() */ public static String valueOf(Object pObj) { return ((pObj != null) ? pObj.toString() : null); } }