Round up/down datetime field with BPM or Formula

We have a requirement that I am really struggling with so all help welcome. Using the BPM I am adding SLA targets using Business Hours to our Tasks. This has been nice and easy to achieve using Business Rules and Processes adding onto the Datetime Start field we are using.

We have a need whereby if a Task is received after a certain time then rather than be 4 business hours it will be 14:00 the following day. I can add the hours but utilising a suite of Business rules to work out how many Business Hours to add.

The bit that I cannot figure out is how to round up/down to the nearest hour.

Has anyone been able to achieve this or similar please?

Thanks

*No code changes please. I would like to achieve if at all possible without impacting the core code.

Parents
  • hello Pete

    below is an idea of rounding down to the hour by retrieving hours digits from the datetime field value via conversion to string following conversion to a number - that may help to build back the necessary DateTime value by concatenating datetime components (day, month, year, hour, 00 minutes)
    I hope this helps.

    however, I'd note that having no coding skills I would configure calculating DateTime Start with Logic Builder tool for Sugar - with a few clicks and no-code - on Task is created/assigned (or whatever other logic triggers Datetime Start calculation) and deploy configuring to SUgar via Module Loader

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Reply
  • hello Pete

    below is an idea of rounding down to the hour by retrieving hours digits from the datetime field value via conversion to string following conversion to a number - that may help to build back the necessary DateTime value by concatenating datetime components (day, month, year, hour, 00 minutes)
    I hope this helps.

    however, I'd note that having no coding skills I would configure calculating DateTime Start with Logic Builder tool for Sugar - with a few clicks and no-code - on Task is created/assigned (or whatever other logic triggers Datetime Start calculation) and deploy configuring to SUgar via Module Loader

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Children