String to Date Conversion in TI - "S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string"

Post Reply
AlphaWay
Posts: 11
Joined: Wed May 20, 2020 6:23 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: Version 2003

String to Date Conversion in TI - "S1000[Oracle][ODBC][Ora]ORA-01861: literal does not match format string"

Post by AlphaWay »

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 ?
TIA,
Wayfarer
declanr
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"

Post by declanr »

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.
Declan Rodger
Wim Gielis
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"

Post by Wim Gielis »

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
User avatar
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"

Post by scrumthing »

Wim Gielis wrote: Wed Aug 05, 2020 10:55 pm For information around NewDateFormatter, ParseDate, FormatDate: see here.
Thanks for that Wim. Good read!
There is no OLAP database besides TM1!
Post Reply