cancel
Showing results for 
Search instead for 
Did you mean: 

DateDiff(interval,date1,date2)

SwapnilPuranik
Level 2
What exactly is the difference between Interval 8 Day of year & Interval 9 Day. Please elaborate

------------------------------
Swapnil Puranik
------------------------------
1 REPLY 1

Hi Swapnil.

In reality, both of these intervals actually provide you the same result which is the unit of difference in terms of day. The reason why we see both these intervals is because when ECMA standard framework languages were developed by Microsoft such as VB .NET, C# and VBA, DateDiff method had this definition by default. My guess is somewhere they wanted to change the metric or the unit in which the value was supposed to be returned but, in the end, they stuck with the same metric of day which got returned while using both the parameters.

Since Blue Prism uses these languages in its internal framework while generating classes and calculations, they also used the same method definition somewhere down the line.

You can see below all the valid date formats we have with this class as per the MSDN documentation:

21734.png

Also, there are references in DBA stack exchange as well which state the same reasoning as I provided you though it is for MS SQL server but again that also is built on same ECMA standards as all the other languages I stated earlier: t sql - SQL Server DATEDIFF: How's dayofyear different from day? - Database Administrators Stack Exchange

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------