How can I transform a String given from keyboard into a Timestamp, and then compare it to a sql Timestamp
<p>I want to transform a String that looks like an sql Timestamp into an actual Timestamp. How can I do that? My string looks like this.</p>

<pre><code>    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Please enter StartTime (YYYY-MM-DD HH:MM:SS): ");

    String StartTime = null;

    try {
        StartTime = reader.readLine();

    } catch (IOException e) {
        e.printStackTrace();
    } 
</code></pre>

<p>Then, I want to compare this timestamp, with a Timestamp from an sql database..Can I do something like that? </p>

<p>Thanks in advance!</p>
