//*********************************************
// 函数名:f_getservertime
// 目标:返回服务器上的时间
// 参数:没有参数
// 返回类型:datetime
// 返回值:ldt_ServerTime
//*********************************************
datetime ldt_ServerTime
declare getdate dynamic procedure for sqlsa;
prepare sqlsa from "select GETDATE()";
execute dynamic getdate ;
fetch getdate into :ldt_ServerTime;
close getdate;
//返回服务器时间
return ldt_ServerTime
引用例子:
String current_date
String current_week
current_date=String(f_getservertime(),"yyyy/mm/dd")
current_week= dayname( date(current_date) )
choose case current_week
case "Monday"
l_str="星期一"
case "Tuesday"
l_str="星期二"
case "Wednesday"
l_str="星期三"
case "Thursday"
l_str="星期四"
case "Friday"
l_str="星期五"
case "Saturday"
l_str="星期六"
case "Sunday"
l_str="星期日"
end choose