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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:08:40+00:00 2026-06-11T09:08:40+00:00

I am getting a date value from jQuery-Calender UI that is giving me the

  • 0

I am getting a date value from jQuery-Calender UI that is giving me the date in string format “mm/dd/yy” e.g 09/16/2012. Now I want to convert this into timestamp format “yyy-MM-dd hh:mm:ss”. Because in the database I have an attribute of Timestamp data type. How can I do this?

Using $( ".selector" ).datepicker({ dateFormat: "yy-mm-dd" })

I am accepting the input as dateFrom = "2012-09-27" but now I want to convert it into date format yyyy-MM-dd hh:mm:ss

But I am getting the exception “unparsable Date “.

I am using following code:

java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
java.util.Date test1=new java.util.Date (sdf.format(dateFrom));
  • 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-11T09:08:42+00:00Added an answer on June 11, 2026 at 9:08 am

    Assuming that you are using jquery’s DatePicker UI tool then you can initialize a datepicker with the dateFormat option.

    Initialize the datepicker’s dateFormat:

    $( ".selector" ).datepicker({ dateFormat: "yy-mm-dd" });
    

    Or, set the dateFormat option, after init:

    $( ".selector" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
    

    Note that this only provides a Date, not a Time.

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

Sidebar

Related Questions

I am getting the date string from the server as 2012-06-21 18:13:33 -04:00 What
I'm trying to convert a string date value from a submitted form into an
i am working on a project where i am getting date value from date-picker
I'm getting a date from a Web Service, dd/mm/yyyy hh:mi:ss. Like this: 10/10/2011 12:00:00
i have some problem, i just getting null value from jDateChooser in jCalendar. This
This Javascript which uses functions from jQuery is quite handy but getting feedback on
i have one date value coming from database and i want to calculate difference
I'm grabbing some data from a database that has a stored date value, and
I am getting the dynamic value from a web server like article desc, date,title
I getting a Date value from JavaScript to a controller in MVC and I

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.