Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Trusted Contributor
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520
My Carrier: TMN

month of year

Hi, sorry if my questions sound silly but I'm a java newbie. I´ve searched thru the forum but i didn´t find the solution(or understand it). 

 

I've a string sDate wich has the value of "Wed, 25 May 2011 05:20:20 GMT".

 

I want to get the year("2011"), the month("05"), the day("25") and hours, minutes and seconds separately.

 

For example I want to get string variable sMonth to have the value of "05", how should I do it?

 

thanks in advance

 

 

 

................................................................................................
Tech On!
PTNews
more at On On On!
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: month of year

On the BlackBerry, if you can't use the HttpDateParser to convert your String to a Calendar or Date variable (read the Javadocs to see if you can), then you are going to have to write code to do this by hand.  Sorry.