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?