Calculate date differences in Data Discovery formats

Sometimes you might want to calculate the difference between 2 dates - or maybe the difference between today and a certain date.

The data source could look something like this:



Now we want to calculate the difference between expected and actual dates.

First we add the data source, right click it and choose to create a format:



Now we add a new column by clicking the + sign in the upper right corner:



We define the new column like this - use the formula durationdays and make sure the destination type is integer:



Now we have a new column that shows the difference between these days in the column difference.


Was this article helpful?
0 out of 0 found this helpful


1 comment
  • I have a question not so related with the above however it goes like this may be you can help me.


    I have two columns check in and check you when i am calculating the difference between the two columns in create format i am doing the following 

    note:i have created 4 new columns for this calculation

    • durationhours(&CheckInTime,&CheckOutTime)
    • durationminutes(&CheckInTime,&CheckOutTime)/100 
    • &Time+&Min
    • &Overtime-&workinghours

    which gives me the difference and the overtime when in the preview section however when i am visualizing the information in the cross tab the data is illustrated as number and not as time.

    Do you know why this is taking place or what i have to change in order to see the data as time?





Please sign in to leave a comment.