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
Developer
Posts: 207
Registered: ‎07-31-2009
My Device: Not Specified

Re: Convert String to date...

Ya that should be the next obvious step and the previous reply was meant for RexDoug

------------------------------------------------------------------------------------------------------------------------
Click the Kudos! badge on left side of the message , if you are happy with a solution given by a user. When you do so, you are saying thanks to its author.
Mark a reply as a solution , if you think your question has been answered.
To mark a message as a solution: Click "Accept as solution" icon on the reply.
Developer
Posts: 207
Registered: ‎07-31-2009
My Device: Not Specified

Re: Convert String to date...

I have solved the problem in a crude way. 

As mentioned previously the string that i was  receiving  was of the following format.

 

"5 Dec 1987 09:56"

 

When i initially passed it through the HttpDateParser it returned zero cos it did not support this format.

I went on to append the string with  " :00 " . And so now it looks like  "5 Dec 1987 09:56:00"  and HttpDateParser took care of the rest...

------------------------------------------------------------------------------------------------------------------------
Click the Kudos! badge on left side of the message , if you are happy with a solution given by a user. When you do so, you are saying thanks to its author.
Mark a reply as a solution , if you think your question has been answered.
To mark a message as a solution: Click "Accept as solution" icon on the reply.
New Developer
Posts: 6
Registered: ‎02-08-2010
My Device: 9700
My Carrier: AT&T

Re: Convert String to date...

Hi, Any body try this time format "YYYY-MM-DDThh:mm:ssTZD" with OS 4.5? I have time string like "2010-08-18T12:52:14-07:00", the HttpDateParser always return the time as timezone +07:00. But in OS 4.6 and higher, return date is correct. Is that bug of OS4.5 that make the timezone wrong?

New Developer
Posts: 6
Registered: ‎02-08-2010
My Device: 9700
My Carrier: AT&T

Re: Convert String to date...

I found the OS4.5 reverse the timezone, parse -07:00 as +07:00 and parse +07:00 as -07:00, i have to switch the +/- before send the string to HttpDateParser of OS 4.5.