I have method that can change date format and return it but it gives exception
<p>I am trying to display the log file in my application as i need for that i have to format the content to display as i require i firslt trying to display the date for which i can get content from los my log file looks like ... .</p>

<pre><code>[1324649399] Nagios 3.3.1 starting... (PID=3751)
[1324649399] Local time is Fri Dec 23 09:09:59 EST 2011
[1324649399] LOG VERSION: 2.0
[1324649400] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1324649400] ndomod: Could not open data sink!  I'll keep trying, but some output may get lost...
[1324649400] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1324649400] Finished daemonizing... (New PID=3752)
</code></pre>

<p>in real application data is display for every one and two minut so the content of above file show date/time which is in square bracket "[1324649399]" so i want to change it in this format "[12-27-2011 08:51:22]" 
   in my method i am trying to change the date first getting from string first then i would implement it for the whole log file my code is,</p>

<pre><code>public Date Date() throws SQLException, ParseException
    {
      DateFormat Format; 
      Date date;
      String dat="1324649399";
      Format=new SimpleDateFormat("dd-MMM-yy");
      date=(Date)Format.parse(dat); 
      return date;
    }
</code></pre>

<p>may be the date format is not like that as i mentioned but i need to format it as i  mentioned above and it just giving error of exception and nothing more
    Hopes to listen from you soon your suggestions </p>

<p>Thanks in Advance!</p>
