cancel
Showing results for 
Search instead for 
Did you mean: 

convert varchar to date in BO Universe with Substring and instring function

Former Member
0 Kudos

to_date(substr(xxxx_v.e_details,instr(xxxx_v.e_details,'|',1,2)+1,9),'DD-MM-YYYY') In the universe while defining the object as date i was facing probs can any body help me out. the column xxxx_e_details is having the datatype varchar in database and the third string is date while i was creating the date object in the universe with the above syntax it was getting the error

The data in this obect is like this xxxx_v.e_details -> wwww|eeee|MM-DD-YY|

Edited by: mohammed kashif on Mar 31, 2011 11:47 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You're taking a substring of 9 characters, yet your date format has 8 characters.

Edited by: Me map on Mar 31, 2011 3:31 PM

Answers (1)

Answers (1)

0 Kudos

WHat is the exact error you get?

Regards,

Stratos

Former Member
0 Kudos

i am getting the data but it is in the format 01-03-0201. The year format for 2010 is populating as 0201. i am not able to think whether it is due to instring function which is reading data like this. Need suggestion from experts.............