on 04-24-2014 4:48 AM
Hi Experts,
I have used 'DateTrans' function to transform the input date format (yyyyMMdd in my case) to output date format (yyyy-MM-dd). But when '00000000' value is passed as input date, output date is coming as 0002-11-30. Please help me understand why input and output date's are different when '00000000' value is passed and also what needs to be done to fix it. (Screenshot attached)
Thanks,
Mani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mani
Please find below the explanation from Java forum on why 00000000 translates to 0002-11-30
0000-00-00 is interpreted as one year before AD 1 which is BC 1, one month before January which is BC 2 December, and one day before the 1st which is BC 2 November 30.
You will need to handle the case where the source input is 00000000, with the following options
i) Trigger mapping exception - Uncheck "Calendar is Lenient" in extended settings of the function
ii) Set a default value if input is 00000000
The below discussion also discusses some of those options:
DATE TRANSFROM function error | SCN
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.