J
jsniemi79
Guest
Rusty, If you take Siddeshwar's code above, just change the "1/1/1970" value in the "to variable to {!Your_Date} to use the field your user can enter. That should always give you the difference between their date and 1/1/1900. Then you won't need your other field for the days since 1970. var from = new Date("1/1/1900"); var to = new Date("{!Your_Date}"); var timeDiff = Math.abs(from.getTime() - to.getTime()); var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
Continue reading...
Continue reading...