at script level when you want to get a field value from a table then you need to use peek functions. as suggested by tresesco.
if you already have a table loaded which has date field as orderdate then you can create another table like below
load max(orderdate) as mxdt resident maintable; // this table will have only one record containing the max date
vMxDT= peek('mxdt',0,'temptab'); // table name not required if it is there just before this script