![]() |
![]() |
![]() |
![]() |
![]() ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() ![]() |
供应求购 | 免费商铺 | 商业资讯 | 库存二手 | 黄页大全 | 生活贴吧 | 房屋租售 | 招聘求职 | 婚恋交友 | 自助广告 |
ASP中CDate函数的用法 | ||
发布时间:2010/11/13 15:07:07 发布人:网络游民 点击:694 | ||
CDate函数能够将有效的日期或是时间表达式转换成为Date类型并返回结果。 Tip: Use the IsDate function to determine if date can be converted to a date or time. 提示:可以使用IsDate函数来判断能否转换成为日期或是时间。 Note: The IsDate function uses local setting to determine if a string can be converted to a date ("January" is not a month in all languages.) 注意:IsDate函数使用的是本地化设置来判断字符串是否能够转换成为日期("January"在所有语言中不一定代表为一个月份) Syntax 语法 CDate(date) Parameter 参数 Description 描述 date Required. Any valid date expression (like Date() or Now()) 必须的。任何有效的日期表达式(如 Date()或Now()) Example 1 举例 1 d="April 22, 2001"if IsDate(d) then document.write(CDate(d))end ifOutput:2/22/01 Example 2 举例 2 d=#2/22/01#if IsDate(d) then document.write(CDate(d))end ifOutput:2/22/01 Example 3 举例 3 d="3:18:40 AM"if IsDate(d) then document.write(CDate(d))end ifOutput:3:18:40 AM -------------------------------------------------------------------------------- Try-It-Yourself Demos 演示 Convert a string to a date object How to use CDate to convert a string to a date. 使用CDate将字符串转换为日期 Convert numbers to a date object How to use CDate to convert a numbers with separators to a date. 使用CDate将分隔的数字转换成为日期 Convert a string to a time object How to use CDate to convert a numbers a time object. 使用CDate将数字转换成时间对象 |
||
![]() |
![]() |
![]() |
※ | 发布回复 | ↓请遵循123发布网同城生活贴吧/论坛发帖规则;↓寻一夜情、包养、招嫖类信息的一律全部删除,并报公安备案↓ | |
|
![]() |
![]() |
网站首页 | 关于我们 | 广告业务 | 关于VIP | 免责声明 | 联系我们 | 设为首页 | 加入收藏 | 意见反馈 | 网站建设 |
123发布网 版权所有 www.123fbw.com 联系电话:18331151646 QQ:1016964448
CopyRight © 2007-2016 All Right Reserved 联系站长 津ICP备10002728号 统计: |