Page 1 of 1

to split date from the date record in DDYYYY format

Posted: Mon Oct 18, 2004 1:13 pm
by yaminids
Hello there,

This is my first post even thougn I was reading other messages from a long time. I think its a great forum for anybody who wants information about Ascential products
Let me explain about my question. I am trying to separate date from a date record in 'ddyyyy' format. can anyone expalin to me how to achieve this.
Thanks in advance.

-Yamini

Posted: Fri Oct 29, 2004 9:31 am
by roy
Hi,
converting dates to any givven format has more then 1 way of doing it.

the conventional way:
Use Oconv() and Iconv() to get dates from any format to internal DS format and then back to a format of your choice.
(read the help on ussage of theese routines).

the substring way:
if you have a date format of "2004-29-10" in a column col1 (since it is easily treated as a string)
you can write something like this:
link1.col1[6,2] : link1.col1[1,4]

now you only need to pick and write.

IHTH,

Re: to split date from the date record in DDYYYY format

Posted: Fri Oct 29, 2004 9:52 am
by chulett
yaminids wrote:I am trying to separate date from a date record in 'ddyyyy' format.
Did you perhaps mean 'dddyyyy' format? :? If so, there is a 'Julian' conversion option for Iconv that would do that for you.

Posted: Sat Oct 30, 2004 12:56 am
by changming
agree with the above. just add some details
this is from help file
J outputs the day of the year as a number, 1 through 366.
sample :
X = Oconv(10740, "D2*JY") X = "147*97"
conver any date into internal date , then convert back using oconv