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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:34:03+00:00 2026-06-13T09:34:03+00:00

I have a form which inserts a date into a table. When primefaces calendar

  • 0

I have a form which inserts a date into a table. When primefaces calendar is used, the date is correct, but the time is added as well (in my case: 00:00:00.0)

here’s my form:

<h:form>
        <h:messages/>
        <h:inputText value="#{testBean.saveTabletest.first}"/><br/>
        <p:inputMask value="#{testBean.saveTabletest.second}" mask="99999"/><br/>
        <p:calendar id="testcal" value="#{testBean.saveTabletest.dates}" dateOnly="true" showOn="button"/><br/>
        <p:commandButton value="Send" action="save"/>
</h:form>

And here is how the date is inserted in the database : 2012-10-03 00:00:00.0

I want the date inserted into the database without the time. The column in the table is a “date-column”

Is there a primefaces property that I can set to do this? or do I have to change the function that saves the data in the table (i am using hibernates saveOrupdate)?

  • 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-13T09:34:04+00:00Added an answer on June 13, 2026 at 9:34 am

    Set the pattern attribute of p:calendar and declare the corresponding testBean member as Date.

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

Sidebar

Related Questions

i have a form which inserts book information into the database. however it is
I have a form which inserts data into a database. There are certain fields
Hi i have a form (X) that inserts data into a mysql table (A)
I have created a Widget, which inserts a form, with a WYSIWYG editor. But
I have a form in html which runs a php script whitch inserts text
I have a form which lets you add names to the table and shows
I have a form(table view) which contains textfields and textview as subviews,I need to
I have a form which captures a date that the user input in a
I currently have a form which takes a date in the format m/d/y -
I have a simple form which inserts a new Category with the given parentID

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.