ASP函数大全(数字函数)(4)
来源:asp之家 时间:2009-06-01 12:33:00
Hour()
函数以24时返回小时数.
表达式 Hour(time)
允许数据类型:
实例:
<%=Hour(#4:45:34 PM#)%>
返回结果: 16
(Hour has been converted to 24-hour system)
Instr()
函数返回字符或字符串在另一个字符串中第一次出现的位置.
表达式 Instr([start, ] strToBeSearched, strSearchFor [, compare])
允许数据类型: Start为搜索的起始值,strToBeSearched接受搜索的字符串 strSearchFor要搜索的字符.compare比较方式(详细见ASP常数)
实例:
<%
strText = "This is a test!!"
pos = Instr(strText, "a")
response.write pos
%>
返回结果: 9
InstrRev()
函数同上,只是从字符串的最后一个搜索起
表达式 InstrRev([start, ] strToBeSearched, strSearchFor [, compare])
允许数据类型: 同上.
实例:
<%
strText = "This is a test!!"
pos = InstrRev(strText, "s")
response.write pos
%>
返回结果: 13
Int()
函数返回数值类型,不四舍五入。
表达式 Int(number)
允许数据类型:
实例:
<%=INT(32.89)%>
返回结果: 32
标签:函数,asp,时间,日期,数字
0
投稿
猜你喜欢
JavaScript实现鼠标经过表格某行时此行变色
2024-04-16 08:51:18
带你熟练掌握Vue3之Pinia状态管理
2024-05-28 15:52:44
空行不空格式排版组织原理
2010-05-03 14:46:00
解决python打不开文件(文件不存在)的问题
2021-10-15 02:39:46
python常用的魔法方法(双下划线)
2022-08-01 23:23:37
MySQL系列之redo log、undo log和binlog详解
2024-01-17 16:30:59
python机器学习之神经网络实现
2022-01-10 08:10:05
Python获取指定文件夹下的文件名的方法
2022-04-26 03:10:03
10个python爬虫入门实例(小结)
2021-04-21 01:08:57
解决Python命令行下退格,删除,方向键乱码(亲测有效)
2023-01-02 16:30:25
MySQL内外连接的具体使用
2024-01-17 13:52:49
golang中strconv.ParseInt函数用法示例
2024-04-23 09:46:48
学习win32com操作word之Range精讲
2021-05-13 11:36:58
JavaScript使用indexOf()实现数组去重的方法分析
2024-04-28 09:39:03
MS sqlserver 2008数据库转换成2000版本的方法
2024-01-28 11:37:53
JAVA正则表达式校验qq号码的方法
2023-08-09 02:54:25
JavaScript函数封装的示例详解
2024-04-25 13:15:51
go语言Pflag Viper Cobra 核心功能使用介绍
2024-04-25 15:26:28
IIS+PHP添加对webp格式图像的支持配置方法
2023-05-28 11:20:11
golang通过mysql语句实现分页查询
2024-01-23 13:30:03