this is For last 24 hours var array = date.split('~'); [2017-11-15 22:01:28 , 2017-11-16 22:01:28] Getting this from UI as array var from = array[0];//2017-11-15 22:01:28 var to = array[1];//2017-11-16 22:01:28 var from = moment(from).format(); to = moment(to).format(); alert(from); combinddate = from + ' ~ ' + to;
"invalid date ~ 2017-11-16T17:53:01+05:30"
2017-11-15T17:53:01+05:30 ~ 2017-11-16T17:53:01+05:30
moment(from)
moment(from, 'YYYY-MM-DDTHH:mm:ssZ').format()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)