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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:32:48+00:00 2026-06-17T20:32:48+00:00

I am using the following jquery date & time picker on a diary page.

  • 0

I am using the following jquery date & time picker on a diary page.
http://trentrichardson.com/examples/timepicker/#rest_examples

Its quick and easy to use and makes a date thats easy to read but the problem I am having is that im not sure how on earth to convert it to a standard mysql date format to save it to the database.

At the moment when I select a date and time it will add it to the timedate input box as something like this >>
Wed January 9, 2013 01:43 pm

If I then hit submit, it doesn’t get saved to the database.

Does anyone know how I can convert this into a format in the php that processes the posted data and save it as usual, as its driving me round the bend trying to work out a way of converting it ?.

The code im currently using for the jquery part is the following :

<script type="text/javascript">
$(function(){
$('#timedate').datetimepicker({
timeFormat: "hh:mm tt",
dateFormat: "D MM d, yy"
 });});</script>

which creates a date like :

 Wed January 9, 2013 01:43 pm
  • 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-17T20:32:50+00:00Added an answer on June 17, 2026 at 8:32 pm

    Use DateTime::createFromFormat():

    $datetime = DateTime::createFromFormat("D F d, Y H:i a", 'Wed January 9, 2013 01:43 pm');
    echo $datetime->format("Y-m-d H:i:s");
    

    Confirmed working

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

Sidebar

Related Questions

I'm using the jQuery Date Picker plugin by Kelvin Luck ( http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ ) and
I am using following attached date picker. http://rapidshare.com/files/417385026/jQuery_Date_Picker.zip http://www.2shared.com/file/d2NK63P-/jQuery_Date_Picker.html Problem is if i don't
i am using jquery ui date picker for take fromDate and toDate Following is
I'm using the following JavaScript Control: http://www.ama3.com/anytime/ How do I get the selected date
I am using following plugin http://pinesframework.org/pnotify/ I am creating dialog using following jquery code..
I'm using the following jquery color picker on my project - www.eyecon.ro/colorpicker. I'm using
I am using the jQuery date picker calendar in a form. Once submitted the
I'm using jQuery's Date Picker for one of my form's field - Date of
I am using the following for date picker control $(function() { $(#datepicker).datepicker({ dateFormat :
I post(using jQuery $.post) the following json DateTime to a WCF service(using C#): /Date(1331713200000)/

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.