岁月沧桑,物是人非,岁月赋予了我什么:财富?知识?皱纹?生活态度?

QTP 提取系统时间的脚本

上一篇 / 下一篇  2012-03-14 10:19:47 / 个人分类:自动化测试

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:

德尔惠的个人空间 引用 删除 德尔惠   /   2012-03-14 15:56:43
5
 

评分:0

我来说两句

hwm831002

hwm831002

从今天开始,一步一个脚印,一天一个台阶,提升自我,充实自我!

日历

« 2024-05-12  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 43640
  • 日志数: 51
  • 图片数: 1
  • 文件数: 1
  • 建立时间: 2008-01-21
  • 更新时间: 2012-11-09

RSS订阅

Open Toolbar