岁月沧桑,物是人非,岁月赋予了我什么:财富?知识?皱纹?生活态度?
QTP 提取系统时间的脚本
上一篇 /
下一篇 2012-03-14 10:19:47
/ 个人分类:自动化测试
'Get the current data and time
function GetDateTime()
Dim Currentdatetime
Dim YY 'Year
Dim MM 'Month
Dim DD 'Day
Dim HH 'Hour
Dim Min 'MInute
Dim SS 'Second
Dim Nowstr
Currentdatetime=now()
YY=Year(Currentdatetime)
MM=Month(Currentdatetime)
If MM<10 Then
MM="0"&MM
End If
DD=Day(Currentdatetime)
If DD<10 Then
DD="0"&DD
End If
HH=Hour(Currentdatetime)
If HH<10 Then
HH="0"& HH
End If
Min=Minute(Currentdatetime)
If Min<10 Then
Min="0"&Min
End If
SS=Second(Currentdatetime)
If SS<10 Then
SS="0"&SS
End If
Nowstr=MM & DD & YY & HH & Min & SS
GetDateTime=Nowstr
end function
收藏
举报
TAG: