• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
8 views

Why i am getting this error: date.getDate is not a function?

Javascript date.getDate is not a function

by (930 points)  

1 Answer

0 votes

Remedy for javascript getDate is not a function issues:

Syntax:

DateObj.getDate()

This is inbuilt function to get the date of a month from provided Date.

To use this function/method,you need an instance of the class Date .

Create instance of Class Date, to use this method. It could be used only with Date Object

else it will throw error.

var getDate = new Date();

getDate .getTime();

by (930 points)  
edited by
...