that's great kevin, Thank you. i didn't realize the selectedDate wasn't a string, i thought if i put var x=xyz, that makes it a string. I'm still fairly new to programming and learning lots. Thanks for your help, I hope I understood that correctly.
Pete