R
RustyPipe
Guest
Siddeshwar. Many thanks This works now 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); Once I removed the "{!id}" it validated and ran. (I guess you had put that in as a database id field and normal good practise). I also learnt about triggers, very useful. Once again Many thanks I will study the above code carefully and take it a part and see why it works (that is how I learn). Can I also say thanks to the wider community for the help and support, for a newbie. it was a positive experience (not one I expected) as I normally approach such forums with extreme caution and trepidation . Rusty
Continue reading...
Continue reading...