Re: serializing an NSTimestamp
Re: serializing an NSTimestamp
- Subject: Re: serializing an NSTimestamp
- From: David LeBer <email@hidden>
- Date: Tue, 18 Nov 2003 15:02:20 -0500
On 18-Nov-03, at 2:38 PM, email@hidden wrote:
[demime could not interpret encoding binary - treating as plain text]
What's the right/easiest way to serialize an NSTimestamp to and from a
String?
I've never done this before; there seem to be so many different ways,
I'm
not sure the appropriate technique to use.
--Jonathan
From the documentation on NSTimestampFormatter:
To string:
NSTimestampFormatter formatter=new NSTimestampFormatter("%m/%d/%y");
String description=formatter.format(myNSTimestamp);
And back:
NSTimestampFormatter formatter=new NSTimestampFormatter("%m/%d/%y");
NSTimestamp
myNSTimestamp=(NSTimestamp)formatter.parseObject(myTimestampString);
;david
--
David LeBer
Codebase Software Systems
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.