Is there any work around for date format DD-MON-RR in oracle in DS 3.2 ?
As of now, I am using the below format in a custom function and using it in my interface.
select RTRIM(TO_CHAR(TO_DATE(‘22-FEB-01’,‘DD-MON-RR’),‘YYYY-MM-DD’)) OUTPUT from dual;
As per my testing, I found it as a limitation in DS 3.2.
I would like to know if there is a better alternative for this by using any functions in DS itself.
The equivalent for DataServices is the YY format. This format value does not append a 20 before the two digit year but either a 19 or 20 depending on the two digit year. What the cutoff value between 19 and 20 actually is can be controlled via the DSConfig.txt file.
But frankly, the logic of that RR is so simple, even a custom script function would work.
Is there any documentation on the DSConfig.txt setting? We have just noticed an issue with the year 15 being converted to 1915 instead of 2015. I would like to know why this happens and what the setting is for changing this behavior.
We found out that this issue occurred here on our batch processing over the weekend when we ran the first 2015 batch data through and had the same thing occur.
We have a few places where we use the SQL() function in DS scripts within work flows and go directly to our Oracle database to query and return dates. In this instance, the inner SQL did not specify the full date format nor use a to_char(my_date,‘dd-mon-yyyy’) to explicitly force the date format we expected. This was done as a to_date() wrapped around the SQL() function call. We kept getting an invalid date of 01-Jan-1915 returned.
We will be looking through our other script code for similar instances and correcting where found.
We have changed our server based DSConfig.txt file from “Century_Year=15” to " Century_Year=50" (arbitrary high value chosen) and then restarted the server when this it was complete.
We created a small script with a loop to query dates from the database to test and verify the issue before reading the BOB forum note above. After we saw the note and made the changes, we were able to verify the correct 2015 dates were returned for all rows where expected.
Tags: 1915, 2015, YYYY, Oracle, date
P.S.: This forum is the first place I looked to research this issue and found this note within a few minutes of searching. We had a fix and had verified the issue within 30 minutes. Invaluable!