Spec-Zone.ru › ColdFusion

createDateTime

Creates a date-time object.

createDateTime(year, month, day, hour, minute, second) → returns date

  • CF6+
  • Lucee
  • BL 1.0.0+
  • See Also: createDate createTime createODBCDateTime

    Argument Reference

    year numeric
    Required

    Integer in the range 0-9999. When in the range 0-29, year is converted to 2000-2029. When in the range 30-99, year is converted to 1930-1999. You cannot specify dates before AD 100.

    month numeric
    Required
    Default: 1

    Numeric month of the year (1-12).

    day numeric
    Required
    Default: 1

    Day of the month.

    hour numeric
    Required
    Default: 0

    Hour of the day in 24-hour notation (0-23).

    minute numeric
    Required
    Default: 0

    Minute within the hour.

    second numeric
    Required
    Default: 0

    Second within the minute.

    millisecond numeric
    Default: 0

    CF 2021+ or Lucee 4.5+ Only

    timezone numeric

    Lucee 4.5+

    Compatibility

    ColdFusion:

    Version 6+ Since CF2016+ month, day, hour, minute are second are optional

    Examples
    Sample code invoking the createDateTime function

    Tag Syntax

    <cfset yourDate = createDateTime("2015", "12", "09", "6", "20", "34")>
    <cfdump var="#yourDate#" />     

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/createdatetime

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API