Re: System time
Re: System time
- Subject: Re: System time
- From: Jim Wong <email@hidden>
- Date: Fri, 10 Mar 2006 00:46:53 +0800
Thanks all... got the datetime thingy to work already.On Mar 9, 2006, at 10:16 AM, Jim Wong wrote: apologies. i tried the GregorianCalendar actually but seem to keep getting the wrong date. okay...
my code is as follows: GregorianCalendar myCalendar=new GregorianCalendar(); String s=myCalendar.getTime().toString(); int year = myCalendar.get(GregorianCalendar.YEAR); int month = myCalendar.get(GregorianCalendar.MONTH); int date = myCalendar.get(GregorianCalendar.DATE);
System.out.println("Now: "+year+"-"+month+"-"+date);
the year and date is returns the correct value. But for month, it returns february instead of march. can anyone enlighten me on this? On 09 Mar 2006, at 11:44 PM, Mark Morris wrote: Is this actually a test to determine just how accommodating the readers of this list are?
Honestly, Jim, you'll get better a better response in the long term if you take some time to try and solve the easy ones yourself, either using the supplied documentation or searching the list archives. If your project is under such a tight deadline that doing some research yourself is impossible, I know that there are people on this list who will (for a fee, of course) build a professional WebObjects application for you, and give you a good starting point for learning and upon which to base your future enhancements or applications.
In this particular case, you don't have to look past the very first constructor on the NSTimestamp reference page for the answer to your question.
Regards, Mark On Mar 9, 2006, at 9:32 AM, Jim Wong wrote: How do I return the system time to be passed into a NSTimeStamp?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden