Jump to content

How to remove time portion of date using javascript?


Recommended Posts

i have a javascript variable which holds date time value... i need only date from it...

<script type="text/javascript">    function update(){    var datefield = document.getElementById("myTextBox_CWPWORKLIST.DUE_DATE").value;    alert(datefield);    }    </script>

here the datefield = 2013-02-21 00:00:00.0... i need datefield = 2013-02-21.. how to get this..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...