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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章