BobbyRachel Posted January 24, 2013 Share Posted January 24, 2013 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 More sharing options...
BobbyRachel Posted January 24, 2013 Author Share Posted January 24, 2013 i got the answer.... <script type="text/javascript"> function update(){ var datefield = document.getElementById("myTextBox_CWPWORKLIST.DUE_DATE").value; alert(datefield);var columnname = dateFormat(datefield, "dd-mm-yy");alert(columnname); } </script> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now