ANSY获取当前时间字符串
!! ========== 获取当前时分的字符串,都是两位数字 ====== write by xdd==== *get,timeValue,active,,time,wall != timeStr0 = chrval(timeValue) != NLoc = strpos(timeStr0,'.') != !!! hourStr != *if,NLoc,eq,0,then != hourStr = timeStr0 != timeStr0 = strcat(timeStr0,'.0') != *elseif,NLoc,eq,2,then != hourStr = strcat('0',strsub(timeStr0,1,1)) != *else != hourStr = strsub(timeStr0,1,2) != *endif != !! minuStr0 != minuStr0 = strsub(timeStr0,NLoc+1,NLoc+2) != minuStr = chrval(valchr(minuStr0)/100*60) != NLoc = strpos(minuStr,'.') != *if,NLoc,eq,2,then != minuStr = minuStr != *elseif,NLoc,eq,2,then != minuStr = strcat('0',strsub(minuStr,1,1)) != *else != minuStr = strsub(minuStr,1,2) != *endif != !! merge != timeStr = strcat(hourStr,minuStr) != !! ========== 获取当前时分的字符串,都是两位数字 ====== write by xdd====
本文来自博客园,作者:xdd1997
转载请注明:https://www.cnblogs.com/xdd1997/p/15248762.html