[progress Communities] [progress Openedge Abl] Forum Post: Re: Rollbase: How Do I Calculate...

  • Thread starter Thread starter jsniemi79
  • Start date Start date
Status
Not open for further replies.
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...
 
Status
Not open for further replies.
Back
Top