Get date range duration in DbFace

work-arrounds and tricks using DbFace. SQL sample code, HTML template sample code.
admin
Site Admin
Posts: 40
Joined: Tue Oct 17, 2017 5:21 am

Get date range duration in DbFace

Postby admin » Thu May 17, 2018 5:08 am

Code: Select all

var fromDate = $('#fromDate').val().split('-');

var end = new moment($.trim(fromDate[1]));
var begin = new moment($.trim(fromDate[0]));

var diff = end.diff(begin, 'days');