If I do
function test()
{
var fromDate="01/17/2012";
var res= Test1(fromDate);
return false;
}
function Test1(d1) {
alert(d1.getFullYear());
}
It is failing at d1.getFullYear() with the message
Microsoft JScript runtime error: Object doesn’t support property or method ‘getFullYear’
What is the problem..please help
Thanks
The problem is that you have a string, and treat it likt it was a
Dateobject.Create a
Dateobject:or parse a string: