I got the same .Thanks
import java.util.*;
public class dated{
public static void main (String args[]){
Date d=new Date(1001091454*1000L);
System.out.println(d);

}




>From: "Wilson, Les J SI-FSIA" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: Help with Oracle dates from Secs passed since 1970
>Date: Wed, 13 Mar 2002 17:19:54 +0100
>
>Hi,
>
>I tried the code below and it generated a date of 21-Sep-2001 (if thats the
>wrong date, I wouldn't bother reading any further!!)
>
>     long secs = 1001091454;
>     Calendar dtDate = Calendar.getInstance();
>     dtDate.setTime (new Date(secs*1000));
>     java.sql.Date newDate = new java.sql.Date(dtDate.getTime().getTime());
>
>
>
>Les
>
>-----Original Message-----
>From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]]
>Sent: 13 March 2002 14:58
>To: [EMAIL PROTECTED]
>Subject: Help with Oracle dates from Secs passed since 1970
>
>
>If anyone has a ready made solution to convert an UNIX TIME of seconds
>passed 1970 into java or oracle dates, please help.
>The number I get is  1001091454 which seconds passed since Jan 1st 1970.
>This needs to be converted to a valid oracle date. The answer will be a 
>date
>
>in 2001.
>
>
>
>
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to