//*********************************************// 函数名: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_dateString current_weekcurrent_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
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18