I've Google a lot of answers to this question but none of the proposed solutions seems to work. I have the following code.
<input type="text" id="startDate">
<script>
$( "#startDate" ).datetimepicker({
showOn: "both",
showButtonPanel: true,
dateFormat: 'DD MM dd yy',
controlType: 'select',
oneLine: true,
timeFormat: 'hh:mm tt',
altFormat: 'yy-mm-dd',
altTimeFormat: "HH:hh"
});
This gives me output that looks like this: "Sat Oct 15 2016 09:00:00 GMT-0500 (CDT)". But I need it to look like this "2016-11-03 09:00:00" in order to put it in MySQL. I'd like the screen output to stay as is, but the value returned to the PHP must look like the second example. To do that I think I need to use one or more of the "alt" format options to datetimepicker. But no amount of trying has produced what I need. Can someone give me an example of what I should do?