2007 Mar 08 8:11 AM
Hi Experts,
I have Date Field in char(10) format..i.e 2007-06-03.
Now i want to remove this extra '-' or '.'. How to do this.( i need this: 20070603)
Thanks in advance.
2007 Mar 08 8:13 AM
replace all occurances of '-' in date with ''.
or
translate date using '- '.
condense date no-gaps.
Regards,
Ravi
2007 Mar 08 8:12 AM
HI,
Use the FM CONVERT_DATE_TO_INTERNAL
It will helps u.
Thanks,
Shankar
2007 Mar 08 8:12 AM
translate w_char using '- '.
condense w_char no-gaps.
after - in single quotes space is necessary...
reward helpful answers..
sai ramesh
2007 Mar 08 8:13 AM
replace all occurances of '-' in date with ''.
or
translate date using '- '.
condense date no-gaps.
Regards,
Ravi
2007 Mar 08 8:19 AM
try this
data : cdate(10) type c value '2007-06-03',
ndate(10) type n.
ndate = cdate.
shift ndate left deleting leading '0'.
cdate = ndate.
it will only take numeric value dont bother about separator whether it is '.' or '-'.
regards
shiba dutta
2007 Mar 08 8:32 AM
hi
good
store each value into a string and at the end use CONCATENATE statement to join all the values except '-' and display that.
Thanks
mrutyun^