I had trouble with the format m-d-y so I changed it to m/d/y. Also I added one extra row in order to include the end date, and I used the "In Days(1)" function in place of the explicit calculations of seconds in a day.
Thanks mpb and MS. Both suggestions were very helpful. I'm learning a lot about lists from this exercise. I had to modify MS' code to add an extra row for the edate (edate - sdate + 86400).
I've been playing with how to format the sdate and edate EditNumber fields to display the entered data as mm/dd/yyyy instead of a number. I can't seem to get that to work. Any suggestions on how to accomplish this? Thanks.
I tried your new code but the values displayed in the dialog box are still numeric and not displayed as date. That is, entering 01/01/2010 becomes 3345148800. Not sure why it worked for you and not me.
Are you sure you ran the most recent code? It has EditText boxes instead of Edit Number boxes. There's no way the text entered could be converted to a JMP date number in the dialog. Try running it after closing and then opening JMP. And yes, I just started up JMP and copy/pasted the new code into a script window. It ran successfully. Let me know how it goes.
I do not have the m/d/y option for column format and if I choose by JSL I get an error. That's why I changed to m-d-y. However the dialog in the script accepted dates given as m/d/y. Maybe an OS or OS localization "feature" (here JMP 8.0.2 running on Swedish Mac OS X).