I have an alpha series contaning date strings which has a mixe of formats and Eviews is unable to read it as a date identifier. Some of the date formats are dd/mm/yyyy and some are yyyy-dd-mm. I want to convert the ones with format yyyy-dd-mm to dd/mm/yyyy.
I have done something like:
Code: Select all
alpha temp=@wreplace(date,"*-*","*##*")
series date_len=@len(temp)
alpha date_mod=@mid(date,6,2)+"/"+@right(date,2)+"/"+@left(date,4)
alpha date_ok=@recode(date_len>10,date_mod,date)
Thanks,
Javier
