• 爱情文章
  • 亲情文章
  • 友情文章
  • 生活随笔
  • 校园文章
  • 经典文章
  • 人生哲理
  • 励志文章
  • 搞笑文章
  • 心情日记
  • 英语文章
  • 范文大全
  • 作文大全
  • 新闻阅读
  • 当前位置: 山茶花美文网 > 经典文章 > 正文

    ASP中FormatDateTime函数用法详解|条件函数if的用法详解

    时间:2020-05-28来源:山茶花美文网 本文已影响 山茶花美文网手机站

    FormatDateTime 函数

    返回表达式,此表达式已被格式化为日期或时间。

    FormatDateTime(Date[, NamedFormat])

    参数

    参数

    描述

    date

    Required. Any valid date expression (like Date() or Now())

    必选项。要被格式化的日期表达式。(如Date()或Now())

    format

    Optional. A Format value that specifies the date/time format to use

    可选项。指示所使用的日期/时间格式的数值

    设置

    NamedFormat 参数可以有以下值:

    常数

    描述

    vbGeneralDate

    0

    Display a date in format mm/dd/yy. If the date parameter is Now(), it will also return the time, after the date

    显示日期和/或时间。如果有日期部分,则将该部分显示为短日期格式。如果有时间部分,则将该部分显示为长时间格式。如果都存在,则显示所有部分。

    vbLongDate

    1

    Display a date using the long date format: weekday, month day, year

    使用计算机区域设置中指定的长日期格式显示日期

    vbShortDate

    2

    Display a date using the short date format: like the default (mm/dd/yy)

    使用计算机区域设置中指定的短日期格式显示日期。如默认的(月/日/年)

    vbLongTime

    3

    Display a time using the time format: hh:mm:ss PM/AM

    使用计算机区域设置中指定的时间格式显示时间

    vbShortTime

    4

    Display a time using the 24-hour format: hh:mm

    使用 24 小时格式 (hh:mm) 显示时间

    • ASP中FormatDateTime函数用法详解|条件函数if的用法详解 相关文章:
    • 爱情文章
    • 亲情文章
    • 友情文章
    • 随笔
    • 哲理
    • 励志
    • 范文大全