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
Developer
Posts: 95
Registered: ‎07-24-2013
My Device: 9380
My Carrier: Airtel
Accepted Solution

get Weekday name from a date (format yyyy/mm/dd )

Hi ,

 In blackberry java application development is there any way to get Weekday name from a date (format  yyyy/mm/dd ).

I have a date like 2013/09/15. I want the output like Sunday

 

Thanks and Warm Regards.

Super Contributor
Posts: 425
Registered: ‎01-02-2013
My Device: BOLD 9900
My Carrier: sdvsdvsd

Re: get Weekday name from a date (format yyyy/mm/dd )

hi, few months back i have asked the same question in the forum and i'm sure you can found the answer in this thread http://supportforums.blackberry.com/t5/Java-Development/get-day-of-week-for-the-selected-date/td-p/2... 

Developer
Posts: 95
Registered: ‎07-24-2013
My Device: 9380
My Carrier: Airtel

Re: get Weekday name from a date (format yyyy/mm/dd )

Thanks Achin fo reply...

 

I am posting my code for help...It can be used to get Weekday name for a date string.

 

//SimpleDateFormat write = new SimpleDateFormat("EEEE-MMM-dd");//It will return Weekday name as full plus monthe name plus date
SimpleDateFormat write = new SimpleDateFormat("EEEE");//It will return Weekday name
Date date = new Date(HttpDateParser.parse("2013/09/12"));
System.out.println(write.format(parsedDate));

 

 

 

Warm Regards.