Link to home
Start Free TrialLog in
Avatar of Mel Parish
Mel ParishFlag for United States of America

asked on

omit comma at end of looping data

Hello, i have a do loop where i am listing dates separated by a comma but i don't want the comma after the last date listed.  How do i get around that?  Thanks in advance.
if not p.eof then
do while not p.eof
schedule=formatdatetime(p("pdsdate"),1) & ", "
p.movenext
loop
end if

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of OmniUnlimited
OmniUnlimited
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mel Parish

ASKER

you got me on the right track, but i used left instead of right and it worked.  Thank you.


schedule=Left(schedule,Len(schedule)-2)
Oops.  My mistake.  Been a long day...
No big deal, made me think.  Thank you so much.  It HAS been a long day and HOT in Texas.
HA!  I don't envy you.  I'm in San Diego and I feel like it's sweltering at 79 degrees.

Thank you for the points.