Second
 
日期序列号获取秒数

语法

Declare Function Second ( ByVal date_serial As Double ) As Integer

用法

#include "vbcompat.bi"
result = Second( date_serial )

参数

date_serial
日期序列号

返回值

从包含日期序列号格式的日期的变量返回秒数。

说明


编译器将不会识别此函数,除非包含vbcompat.bi.

例子

#include "vbcompat.bi"

Dim ds As Double = DateSerial(2005, 11, 28) + TimeSerial(7, 30, 50)

Print Format(ds, "yyyy / mm / dd hh:mm:ss"); Second(ds)


与QB差别

  • 在QB中不存在该函数出现在PDS和VBDOS中

参考