A new knowledge base article has been published on our support portal.
Scenario
Below we have listed examples of the TimeRangeGetRelation() function to help you understand how to use it.
Each example has their result in comments.
Formula
Smartflow(
TimeRangeGetRelation(CreateDate('2018','1','10'), CreateDate('2018','1','15'), CreateDate('2018','1','1'), CreateDate('2018','1','8')), /* Returns After */
TimeRangeGetRelation(CreateDate('2018','1','10'), CreateDate('2018','1','15'), CreateDate('2018','1','1'), CreateDate('2018','1','10')), /* Returns Start Touching */
TimeRangeGetRelation(CreateDate('2018','1','10'), CreateDate('2018','1','15'), CreateDate('2018','1','1'), CreateDate('2018','1','12')), /* Returns Start Inside */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','1'), CreateDate('2018','1','15')), /* Returns Inside Start Touching */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','1'), CreateDate('2018','1','8')), /* Returns Enclosing Start Touching */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','3'), CreateDate('2018','1','8')), /* Returns Enclosing */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','3'), CreateDate('2018','1','10')), /* Returns Enclosing End Touching */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','1'), CreateDate('2018','1','10')), /* Returns Exact Match */
TimeRangeGetRelation(CreateDate('2018','1','5'), CreateDate('2018','1','10'), CreateDate('2018','1','1'), CreateDate('2018','1','15')), /* Returns Inside */
TimeRangeGetRelation(CreateDate('2018','1','5'), CreateDate('2018','1','10'), CreateDate('2018','1','3'), CreateDate('2018','1','10')), /* Returns Inside End Touching */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','8'), CreateDate('2018','1','15')), /* Returns End Inside */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','10'), CreateDate('2018','1','15')), /* Returns End Touching */
TimeRangeGetRelation(CreateDate('2018','1','1'), CreateDate('2018','1','10'), CreateDate('2018','1','12'), CreateDate('2018','1','15')) /* Returns Before */
)