Hi All,
My Data flow
DB -> TM1 -> DB
Date - > String -> Date
Issue Format : 2021-12-31
In the final "Cube view to Table load" process , I have a insert statement in which i am sending Date column without conversion , which throws an following error .
"S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string" -- it says Date format is wrong in my insert statement .
I extracted the insert query and tested in Oracle, the cause is the date(Issue format) . I modified the format to "01-Jan-2021" and it worked in oracle .
How do i change the format in TI process ?
String to Date Conversion in TI - "S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string"
-
- MVP
- Posts: 1828
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: String to Date Conversion in TI - "S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string"
Generally speaking I would suggest if possible that you store the date as a numeric cell in TM1 and just format it to look like a date; generally that makes most things a lot easier.
That being said since you currently have it as a string; I would start by converting your string to a number ( ParseDate function ) and then with that serial number you can convert it into any format of date you want using the FormatDate function.
That being said since you currently have it as a string; I would start by converting your string to a number ( ParseDate function ) and then with that serial number you can convert it into any format of date you want using the FormatDate function.
Declan Rodger
-
- MVP
- Posts: 3233
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: String to Date Conversion in TI - "S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string"
For information about NewDateFormatter, ParseDate, FormatDate: see here.
Last edited by Wim Gielis on Mon Aug 17, 2020 10:46 am, edited 1 time in total.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
- scrumthing
- Posts: 81
- Joined: Tue Jan 26, 2016 4:18 pm
- OLAP Product: TM1
- Version: 11.x
- Excel Version: MS365
Re: String to Date Conversion in TI - "S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string"
Thanks for that Wim. Good read!Wim Gielis wrote: ↑Wed Aug 05, 2020 10:55 pm For information around NewDateFormatter, ParseDate, FormatDate: see here.
There is no OLAP database besides TM1!