mscrm-addons.com - Blog

News.mscrm-addons.com Blog

rss

Hello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts!


DocumentsCorePack DateTime Field Syntax (Dynamics 365)

The DateTime Field option of DocumetnsCorePack allows you to perform basic calculations on dates and times. This article describes the syntax that can be used for those calculations.

  1. The basic syntax
    Fields from Dynamics are enclosed by << and >> when you insert them from the treeview.

     

  2. The difference between two dates can be subtracted by using a '-'

     

  3. Functions on a date can be executed by adding a dot (.) and the function name including the necessary parameters. 

     

  4. Supported functions and operators
    Operator Name Sign 
     Difference

    Function Description   Examples
     Add(value, unit) Adds a numeric value to the current date.
    The first parameter represents the numeric value that should be added.
    The second parameter represents the unit. 
    Parameters for units are either: year, month, weeks, days, hours, minutes, seconds, milliseconds

     <<createdon>>.Add(10,year) 
     Subtract(value, unit) Subtracts a numeric value form the current date.
    The first parameter represents the numeric value that should be subtracted.
    The second parameter represents the unit. 
    Parameters for units are either: year, month, weeks, days, hours, minutes, seconds, milliseconds  

     <<createdon>>.Subtract(10,year) 
     Addbusinessdays(value)    Adds a certain amount of days to the current date.
    Weekends (Saturday and Sunday) are excluded from this calculation.


      <<createdon>>.Addbusinessdays(10)  
     Round(unit, direction) Round allows you to modify a time value to the next or previous quarter, half or full hour.
    The first parameter can display a quarter, half or full hour. 
    The second parameter represents the direction. (up/down)
     <<createdon>>.Round(quarter,up)
     <<createdon>>.Round(half,down)
     <<createdon>>.Round(full)


Please Note: You can not join several functions calls. If you would like to added days and months please always use the lowest unit for your call.
e.g. 1 Month and 15 Days would be 45 Days 

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.




Comments are closed.