Avatar of meldraper
meldraper
Flag 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

ASP

Avatar of undefined
Last Comment
OmniUnlimited

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
OmniUnlimited

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
meldraper

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)
OmniUnlimited

Oops.  My mistake.  Been a long day...
meldraper

ASKER
No big deal, made me think.  Thank you so much.  It HAS been a long day and HOT in Texas.
Your help has saved me hundreds of hours of internet surfing.
fblack61
OmniUnlimited

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.