I have a date in this format: 05-Jun-2013, I just need year and it need to be converted to just 2013, for my validation purpose. How can I do this, please be concerned that, .getFullYear() is not working.
By default getFullYear should work. Might be a possibility that you are not having the appropriate object for usage.
You follow this approach
var dateString = "05-Jun-2013";
var dateStringArray = dateString.split("-");
var yearValue = dateStringArray[2];