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

  • Thread starter Thread starter sgajula
  • Start date Start date
Status
Not open for further replies.
S

sgajula

Guest
Hello Rusty, The above code is working fine, follow these steps: 1)Create a 'Date' Field with name "mydate". 2)Create a 'Integer' Field with name "myintfield" 3)now keep this below code in any trigger with some timing option: var from = new Date("1/1/1900"); var to = new Date("{!mydate}"); var timeDiff = Math.abs(from.getTime() - to.getTime()); var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); rbv_api.setFieldValue("dateobj", "{!id}", "myintfield",diffDays); 4)Create record with some date. 5)you can see the resultant difference value is assigned to "myintfield" field. Thanks, Siddeshwar.

Continue reading...
 
Status
Not open for further replies.
Back
Top