Choose Language Hide Translation Bar
saitcopuroglu
Community Trekker

Converting Character Set representing an interval to Date Variable

Hi to everyone,

I have a set of data and the data variable is an interval in character where I would like to convert it to numeric date column with choosing either the first or the second character set as real date data. Tried text to columns but delimiter set apart each character by "-" and I couldn't "jump" further.

Many thanks for your help!

8722_Screen Shot 2015-05-02 at 11.24.18.png

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Converting Character Set representing an interval to Date Variable

Create two new columns, Date1 and Date2.  Set the format of each to be "yyyy-mm-dd".  Add the following formulas:

Date1

Informat( Substr( :Date, 1, 10 ), "yyyy-mm-dd" )


Date2

Informat( Substr( :Date, 14, 10 ), "yyyy-mm-dd" )


View solution in original post

1 REPLY 1
pmroz
Super User

Re: Converting Character Set representing an interval to Date Variable

Create two new columns, Date1 and Date2.  Set the format of each to be "yyyy-mm-dd".  Add the following formulas:

Date1

Informat( Substr( :Date, 1, 10 ), "yyyy-mm-dd" )


Date2

Informat( Substr( :Date, 14, 10 ), "yyyy-mm-dd" )


View solution in original post