Time related issue

Hi ,

I have two date start date and end date , and i want time duration in days but the problem is data is coming from task report .

a!gridTextColumn(
label:"Start Date",
field:"c6",
data:index(local!dataset.data,"c3",{})
), 

and 

a!gridTextColumn(
label:"End Date",
field:"c8",
data:index(local!dataset.data,"c11",{})

),

i need one more column which shows the duration of time for these two date .

please suggest 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Appian Employee
    in reply to danb0002

     If you need to do this in a grid, just reference both of your columns using a!forEach(). Here's an example of how you can set up the column:

    a!gridTextColumn(
      label: "Duration",
      data: a!forEach(
        items: local!dataset.data,
        expression: todecimal(fv!item.c11 - fv!item.c3)
      )
    )

    I used the decimal because it will give you a count in days - if you want to format it differently, you might have to parse out the parts of the interval (see davidl's post above mine).

Children