Ok guys, you may think this is a duplicate but its not... I got a very wierd result. So im currently making a fourum in AngularJS , and when i logged the date the user created a topic, it gave me this:
1460742376663
I was like ok maybe if i do date.getFullYear(); it would work.. But guess what any methods didnt work. Well then i understood why because when i executed this statement
console.log(typeof date)
It gave me a string... So then i was in the look for how to convert string to date. And i found it so i tried this:
var newDateFormat = new Date(date)
To try to convert it to an Object Date. But Guess what.... when i logged that newDateFormat it gave me Invalid Date.. So now i have no clue what to do. Please Help! I will be out somewhere, so i wont see anwser soon. Maybe it works with an algoithm? But i checked that to by trying to find the year in that date number :
1460742376663
I didnt find... Please help. As i said i am leaving now i will see anwser later!