DateDiff() - how to calculate the number of days between dates in the same column?
book
Article ID: KB0070349
calendar_today
Updated On:
Spotfire Analyst
|
All
|
Spotfire Business Author
|
All
|
Description
Given a column named [EventDate] with a DataType of Date, how to calculate the number of days between dates in that column?
Issue/Introduction
This article shows a way to calculate the number of days between dates in the same Date column, using DateDiff().
Environment
All supported operating systems
Resolution
The following call to DateDiff() will do this:
DateDiff('dd',First([EventDate]) OVER (Previous([EventDate])),[EventDate])
Additional Information
Spotfire desktop client help topics with the following titles:
Date and Time Functions
OVER Functions
First and Last
Feedback
thumb_up
Yes
thumb_down
No