org.postgresql.jdbc2
Class TimestampUtils

java.lang.Object
  extended by org.postgresql.jdbc2.TimestampUtils

public class TimestampUtils
extends Object

Misc utils for handling time and date values.


Method Summary
 Date toDate(Calendar cal, String s)
           
 String toString(Calendar cal, Date x)
           
 String toString(Calendar cal, Time x)
           
 String toString(Calendar cal, Timestamp x)
           
 Time toTime(Calendar cal, String s)
           
 Timestamp toTimestamp(Calendar cal, String s)
          Parse a string and return a timestamp representing its value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toTimestamp

public Timestamp toTimestamp(Calendar cal,
                             String s)
                      throws SQLException
Parse a string and return a timestamp representing its value.

Parameters:
s - The ISO formated date string to parse.
Returns:
null if s is null or a timestamp of the parsed string s.
Throws:
SQLException - if there is a problem parsing s.

toTime

public Time toTime(Calendar cal,
                   String s)
            throws SQLException
Throws:
SQLException

toDate

public Date toDate(Calendar cal,
                   String s)
            throws SQLException
Throws:
SQLException

toString

public String toString(Calendar cal,
                       Timestamp x)

toString

public String toString(Calendar cal,
                       Date x)

toString

public String toString(Calendar cal,
                       Time x)


Copyright © 2013. All Rights Reserved.