Re: Convert UNIX timestamp

2006-06-21 Thread Chuck Hill
new NSTimestamp(seconds * 1000) On Jun 21, 2006, at 4:21 PM, Drew Thoeni wrote: I have a UNIX timestamp (seconds since 1/1/70) that is a string and am trying to convert it to an NSTimestamp. I can find plenty of info on converting strings to dates, but all the methods expect dates in some

Re: Convert UNIX timestamp

2006-06-21 Thread Tanmoy Roy
Hi Drew, I normally use my own method to do what you are trying. Please find attached a sample code which I believe will solve your purpose. In the code I have used system date just for example. You can pass any valid date. USAGE: eyeMAC:~/Desktop ccdbbsr$ javac DateConverter.jav

Re: Convert UNIX timestamp

2006-06-21 Thread Art Isbell
On Jun 21, 2006, at 1:21 PM, Drew Thoeni wrote: I have a UNIX timestamp (seconds since 1/1/70) that is a string and am trying to convert it to an NSTimestamp. NSTimestamp(long time) Creates an NSTimestamp representing the specified number of milliseconds since the reference date,

Convert UNIX timestamp

2006-06-21 Thread Drew Thoeni
I have a UNIX timestamp (seconds since 1/1/70) that is a string and am trying to convert it to an NSTimestamp. I can find plenty of info on converting strings to dates, but all the methods expect dates in some month-day-year format. I'm pretty sure others have faced this. Ideas? Regards,