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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:47:51+00:00 2026-06-16T01:47:51+00:00

I am creating a website using struts2,mysql,hibernate(for table to class mapping) In Mysql value

  • 0

I am creating a website using struts2,mysql,hibernate(for table to class mapping)

In Mysql value stored is
2012-12-10 00:04:52

After fetching it to a variable “addedDate” i tried printing it

class d{
Date addedDate;
}

addedDate is 2012-12-10 00:04:52.0

In Hibernate mapping (xml file) i have given

<property name="addedDate" type="timestamp">
            <column name="ADDED_DATE" length="19" not-null="true" />
        </property>

In the Action class i have created

List<d> dList

in jsp

<s:iterator value="dList" >
<td><s:property value="addedDate" /></td>   
</s:iterator>

The output i get on the screen
12/10/12 12:04:52 AM.000

I want to remove the “.000” in my outtput any suggestions please

i tried changing type hibernate xml file to Date 1st then to time. Each time its giving only time or date but i want both without milliseconds.

1 way would be to create a string variable in class d copy addedate to that string then do modification and show on jsp. In that case i don’t know to convert from 24hr to 12 hr format

please suggest me if there is any other way or if u need any clarifications do ask me.Thanks in advance

  • 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-06-16T01:47:52+00:00Added an answer on June 16, 2026 at 1:47 am

    Take a look at the date tag.

    Sample from the doc (adapted):

    <s:iterator value="dList" >
        <s:date name="addedDate" format="dd/MM/yyyy" />
    </s:iterator>
    

    (not tested)

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

Sidebar

Related Questions

I am creating a website using master page, which works fine. but after I
I'm creating a message-board website using Rails. I have a Topic class and Post
i am creating a website with a database attached using netbeans, and MySQL. I
I am creating a website using Java EE. I have created a table in
I am creating a simple search function for my website using MySQL and PHP.
I am creating a website that is using a perl script, PHP, a MySQL
I'm creating a website using PHP and MySQL to post related sites. I'm using
When creating a website using Asp.Net and using controls such as the ListView is
I am creating a website using ASP.NET that supports multiple languages. For that I
So I am creating a website using Django templates, forms etc. One thing I've

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.