Didn't realize you were using calendar boxes. Try this:
nw = new window("Test Dates", << modal(),
text box("Monitoring & Trending"),
hlistbox(
panelbox("From Date",
cal_start = calendar box(<< Show Time( 0 )),
),
panelbox("To Date",
cal_end = calendar box(<< Show Time( 0 )),
),
),
ok_button = button box("OK",
startdate = cal_start << get date;
enddate = cal_end << get date;
)
);
print(format(startdate, "ddMonyyyy" ), format(enddate, "ddMonyyyy" ));