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 6975807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:24:59+00:00 2026-05-27T17:24:59+00:00

I have retrieve the Order table form database using hibernate criteria option. In my

  • 0

I have retrieve the Order table form database using hibernate criteria option. In my hbm there is class Order.java in this class there is a variable

private Date createdAt;

like this

and here is my getter and setter like this

  public Date getCreatedAt() {
        return this.createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

and in my action page i have tried to set the values in createdAt field in different format
like this

   DateFormat formatter ;
   Date date ; 
   formatter = new SimpleDateFormat("dd-MMM");
   Iterator it = salesDetails.iterator();
   while(it.hasNext()){

       Order o=(Order) it.next(); 
       date = (Date)formatter.parse("22-June");
       o.setCreatedAt(date);

       System.out.println(o.getCreatedAt());
   }

But i cannot insert data in this format into this variable as createdAt is a Date variable. But i need to get the data in “date-month” format. I don’t want to display the year there.
How is it possible. Is it possible to get data like this using this createdAt variable?

  • 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-27T17:24:59+00:00Added an answer on May 27, 2026 at 5:24 pm

    If you want to format date inside your jsp page there are lots of way to achieve this one such way is to use Struts2 build formatting feature

    refer this official page for details

    formatting-dates-and-numbers

    Alternatively best way to use Struts2 date tag for more details refer this page.

    Struts2 Date Tag

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an order header table called OrderH. In this table there is a
I have the following recursive table-valued function in MS SQL, in order to retrieve
I have table in my SQL Server database called OrderDetail which stores the order
I have generic list which must be a preserved order so I can retrieve
I have a 3-leveled hierarchy of entities: Customer-Order-Line, which I would like to retrieve
I have little question about how web browser retrieve webpage? I know this User
I have a table defined as such: Name - Order# - Widget Count Bob
In order to have a well scrambled table (for a psychological experiment), I'd like
I have the following code to retrieve customer name, total (orders ), sum (order
I have an assignment that asks me to retrieve delimited text from form values.

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.