Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Javascript dropping trailing zero's on replace

Avatar

Avatar
Validate 1
Level 1
klowenst
Level 1

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
klowenst
Level 1

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
klowenst
Level 1

20-05-2009

Part of script I'm working on searches for a colon and removes it. It works great unless zero's are entered after the colon. I that case the zero's are dropped.

if

(TimeReceived.rawValue.search(":"))

val1

= TimeReceived.rawValue.replace(":", "");

else val1 = TimeReceived.rawValue;

For example:

15:15 = 1515

15:00 = 15

The missing zero's cause an issue later in the script. Is there a better way to do this or to add the zero's back in?

Thanks for any input on this issue.

View Entire Topic

Avatar

Avatar
Validate 1
Level 9
Steve_L_Walker
Level 9

Likes

197 likes

Total Posts

1,435 posts

Correct Reply

212 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 9
Steve_L_Walker
Level 9

Likes

197 likes

Total Posts

1,435 posts

Correct Reply

212 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
Steve_L_Walker
Level 9

20-05-2009

The queuing problem has been reported to Jive Software, again.

Please send a private message with your email address, or send an email to stwalker.adobe@gmail.com, I will forward the sample.