html5/css教程

javascript教程

asp教程

php教程

jsp教程

C#/.NET教程

Python教程

网络营销

建站经验

点击排行

asp与时间相关函数大全

来源:中文源码网    浏览:434 次    日期:2024-04-15 17:21:14


Date(), Time(), Now()
返回当前系统日期/时间/日期和时间

DateAdd(interval, number, date)
返回与特定时间单位计算过时间差的日期或时间

DateDiff(interval, date1, date2 [,firstdayofweek[, firstweekofyear]])
返回特定时间单位两个日期(和/或时间)的时间差

DatePart(interval, date[, firstdayofweek[, firstweekofyear]])
返回给定日期的特定部分

DateSerial(year, month, day), TimeSerial(hour,minute, second)
通过指定日期/时间的各部分返回日期/时间子类型日期

DateValue(date), TimeValue(time)
返回日期/时间部分

Year(date), Month(date), Day(date), WeekDay(date)
返回日期的年/月/日/周的第几天。

MonthName(month[, abbreviate]), WeekdayName(weekday, abbreviate, firstdayofweek)
返回月份/星期的本地表示字符串,如“十月”,“星期三”

Hour(time), Minute(time), Second(time)
返回时间的时/分/秒

Timer()
返回从零时起的秒数,精确到小数点后两位,即1/100秒


精彩推荐