首页

Asp常用通用函数:生成时间的整数 函数介绍

'函数名:GetMyTimeNumber()
'作 用:生成时间的整数
'参 数:lx ---- 时间整数的类型
' lx=0 到分钟 lx=1 到小时 lx=2 到天 lx=3 到月
'返回值:生成时间的整数值(最小到分钟)
'示 例:
'**************************************************
Public Function GetMyTimeNumber(lx)
If lx=0 Then GetMyTimeNumber=Year(Date)*12*30*24*60+Month(Date)*30*24*60+Day(Date)*24*60+Hour(Time)*60+Minute(Time)
If lx=1 Then GetMyTimeNumber=Year(Date)*12*30*24+Month(Date)*30*24+Day(Date)*24+Hour(Time)
If lx=2 Then GetMyTimeNumber=Year(Date)*12*30+Month(Date)*30+Day(Date)
If lx=3 Then GetMyTimeNumber=Year(Date)*12+Month(Date)
End Function