Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to calculate days between dates?

Received Response
195
Views
2
Comments

Summary

How to calculate days between dates?

Content

For example, I've two dates, the Delivery date and Ordering Date, how could I calculate the days between them, so that I'll find out how long it takes the goods out of warehouse? Is there any function in DVD to support this? Such as datediff ... BTW, I found DAYOFYEAR maybe useful, but it returned a attribute (A) but not a value(#), and I can't use it for further drilling. Thanks for your kindly reply.

Answers

  • Rank 3 - Community Apprentice

    in v3 of the product Oracle have introduced TIMESTAMPDIFF, I've used as part of a workflow (create new column with the calculation, you can chose the level of difference, context :

    nterval is the specified interval. Valid values are: SQL_TSI_SECOND,SQL_TSI_MINUTE, SQL_TSI_HOUR,SQL_TSI_DAY,SQL_TSI_WEEK,SQL_TSI_MONTH,SQL_TSI_QUARTER,SQL_TSI_YEAR.

  • Rank 3 - Community Apprentice

    Thanks, it worked.

    image

    And any  "# Value" would be divided by time periods now.

    image

Welcome!

It looks like you're new here. Sign in or register to get started.