• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not sure why this doesn't work...  RSS feed

 
Lisa Beglaw
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Doesn't show a space between the days.getDisplayValue() and hour. But as soon as I put " " in there I get an error '; expected'.

I am sure it is something small that I am missing, but what can I get in there to get a space so my time doesn't show as

"Sunday12:00 AM"

Thanks, Lisa
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Lisa Beglaw
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We haven't learned about append yet. Is there any other way?
 
Lisa Beglaw
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm...I got it to work (update my day of the week increment method to show the day as "Monday ". Not sure if that is the RIGHT way to do it, but it gets the job done.

 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's pretty yucky. Just add a space in there:

displayString = days.getDisplayValue() + " " + hour + ":" + minutes.getDisplayValue() + amOrPm;

If you didn't have plus signs in between everything, you'd get an error like the one you showed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!