View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_641_] joel[_641_] is offline
external usenet poster
 
Posts: 1
Default len replace function


Use split and join. Below is an example of the different things you can
do.



If you input was in a variable called MyStr

SplitArray = split(MyStr,"<__")

for each str in SplitArray
'convert the string to a date
MyDate = DateValue(str)
MyYear = Year(MyDate)
MyMonth = Month(MyDate)
MyDay = Day(MyDate)

'convert date back to string
MyNewDate = DateSerial(MyYear,MyMonth,MyDay)

'format date as you like it
MyNewDateStr = format(MyNewDate,"MMMM-DD-YYYY")
str = MyNewDateStr
next str

'put new dates back into a string
MyNewStr = Join(MyStr,"<__")


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=176304

Microsoft Office Help