I have a jQuery Date function which shows output like July 09 2012
. Now I want to change this string value to a long value like 1335363564815
, eg milliseconds. How can I do this?
This is my code for my calender:
<script type="text/javascript">
$('#date2').jdPicker({date_format:"FF dd YYYY"});
</script>
I use this plugin: jquery.jdpicker.js
You can do
var milliseconds = Date.parse($('#date2').val());
Parses a string representation of a JavaScript date, and returns the number of milliseconds
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.