There's 2 ways to do this, both of them require you to create a Calculated Field.
[Updated Date] - [Inserted Date]
#2 uses the datediff function
datediff('day',[Inserted Date], [Updated Date])
DATEDIFF(date_part, date1, date2)
Returns the difference between date1 and date2 expressed in units of date_part. For example, DATEDIFF(’month', #July 15, 2004#, #April 15, 2004#) = -3
This expression returns -3 because April is three months before July.
Thanks for your reply and I am able to get. But I am getting Null letter if use any condition by using datetime.
Ex. I need to get datetime based on Status field as below created 2 calculated field,
Inserted Date = IF([Status]='launch') THEN [Time] END
Updated Date =IF([Status]='publish') THEN [Time] END
and again created one more calculated field as below
DateTime Diff = [Updated Date] - [Inserted Date]
But I am getting Null for 'DateTime Diff' calculated field.
Please let me know if I need to do any change in the calculation or any others.
If Time is a date field, then the calculation should work as Aaron mentioned.
The DateTime Diff calculated field, however, that is above in your last post will not work. Rather the calculated field should look like the following:
datediff('hour', [Updated Date], [Inserted Date])
**Note: hour can be substituted with any date part
Hope this helps!