Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Date_diff and Julian function not correct?

$
0
0

Hi, guys,

I was just trying to create a custom function with DS4.2 SP5. I noticed the result I get from date_diff is different from what I get from the DB level.

 

In DS:

print(date_diff(to_date('0001-01-01','YYYY-MM-DD'),to_date('2008-03-03','YYYY-MM-DD'),'D'));

Result : 733103

 

In Oracle:

select to_date('2008-03-03','YYYY-MM-DD') -to_date('0001-01-01','YYYY-MM-DD') from dual;

Result: 733105

 

 

Then by looking in to the Julian function,

 

print(julian(to_date('1508-03-03','YYYY-MM-DD')));

DS result: 2271907         Correct value :2271917

 

print(julian(to_date('0001-01-01','YYYY-MM-DD')));

DS result: 1721426         Correct value :1721424

 

 

Does anyone see this before? Is this a bug in SP5?


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>