欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

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

程序员文章站 2023-12-01 09:00:10
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