-3


I am passing a date time from controller to view. In view i can get the date as date(1494343074100). How can i convert the date into formatted datetime. please any one help

Eraiarasu
  • 1
  • 1
  • 6
  • http://stackoverflow.com/questions/4673527/converting-milliseconds-to-a-date-jquery-js – João Silva May 09 '17 at 15:15
  • Possible duplicate of [Converting milliseconds to a date (jQuery/JS)](http://stackoverflow.com/questions/4673527/converting-milliseconds-to-a-date-jquery-js) – Badacadabra May 09 '17 at 22:52

1 Answers1

0

Below is a way to convert to date.

var time = 1494343074100;
var date = new Date(time);
console.log(date.toString());
Damien
  • 1,582
  • 1
  • 13
  • 24