Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6750757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:50:46+00:00 2026-05-26T12:50:46+00:00

I have date in this format 2011-11-02 . From this date, how can we

  • 0

I have date in this format 2011-11-02. From this date, how can we know the Day-of-week, Month and Day-of-month, like in this format Wednesday-Nov-02, from calendar or any other way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:50:47+00:00Added an answer on May 26, 2026 at 12:50 pm

    If it were normal java, you would use two SimpleDateFormats – one to read and one to write:

    SimpleDateFormat read = new SimpleDateFormat("yyyy-MM-dd");
    SimpleDateFormat write = new SimpleDateFormat("EEEE-MMM-dd");
    String str = write.format(read.parse("2011-11-02"));
    System.out.println(str);
    

    Output:

    Wednesday-Nov-02
    

    As a function (ie static method) it would look like:

    public static String reformat(String source) throws ParseException {
        SimpleDateFormat read = new SimpleDateFormat("yyyy-MM-dd");
        SimpleDateFormat write = new SimpleDateFormat("EEEE-MMM-dd");
        return write.format(read.parse(source));
    }
    

    Warning:
    Do not be tempted to make read or write into static fields to save instantiating them every method invocation, because SimpleDateFormat is not thread safe!

    Edited

    However, after consulting the Blackberry Java 5.0 API doc, it seems the write.format part should work with blackberry’s SimpleDateFormat, but you’ll need to parse the date using something else… HttpDateParser looks promising. I don’t have that JDK installed, but try this:

    public static String reformat(String source) {
        SimpleDateFormat write = new SimpleDateFormat("EEEE-MMM-dd");
        Date date = new Date(HttpDateParser.parse(source));
        return write.format(date);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Date/Time they come from a Apache server in this format :
I have this date as string with me 15-07-2011 which is in the format
I am getting date in 2011-10-01T21:00:00.0000000-07:00 format from the server. I have tried to
I'm parsing this date format from XML:=> 2011-12-06T07:41:14.016+00:00 , and I'm getting this error:
I would like to know who can I retrieve the date from a file.
I have a date in this format 10/12/2011 12:55:00 PM (MM-DD-YYYY time) I would
I have the need to display a date in this format: dd/mm/yyyy. This is
I have a date like this:- 20091023 i have to convert it to a
I have a SQL Server 2005 output like this: Date | Result | Sum
I have a text like: I've got a date with this fellow tomorrow. Well

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.