Type in the words(s) to search for:

    Mark results
      Userbooster Help

      Date-Time Object

      An object representation of the date-time data type and placeholder for date-time constants. This type similar to the floating point object.

      Properties

      type

      Returns a string that represents the current object.

      year

      Gets/sets the year. The value must be greater than 1900.

      month

      Gets/sets the month. The value must be in the range of 1 to 12.

      day

      Gets/sets the day. The value must be in the range of 1 to 31.

      hour

      Gets/sets the hour. The value must be in the range of 0 to 23.

      minute

      Gets/sets the minute. The value must be in the range of 0 to 59.

      second

      Gets/sets the second. The value must be in the range of 0 to 59.

      msecond

      Gets/sets the millisecond. The value must be in the range of 0 to 999.

      Methods

      setGMT

      Sets the value to the current GMT time and returns true if the method succeeded or false otherwise.

      setLocal

      Sets the value to the current local time and returns true if the method succeeded or false otherwise.

      format

      Returns a formatted string representation. The length of the returned string is limited to 255 characters.

      Parameters

      strFormat

      Format represented as a string.

      Supported format placeholders:

      %a

      Abbreviated weekday name.

      %A

      Full weekday name.

      %b

      Abbreviated month name.

      %B

      Full month name.

      %c

      Date and time representation appropriate for locale.

      %d

      Day of month as a decimal number (1..31).

      %H

      Hour in 24-hour format (0..23).

      %I

      Hour in 12-hour format (1..12).

      %j

      Day of year as a decimal number (1..366).

      %m

      Month as a decimal number (1..12).

      %M

      Minute as a decimal number (0..59).

      %p

      Current locale's A.M./P.M. indicator for the 12-hour clock.

      %S

      Second as a decimal number (0..59).

      %U

      Week of the year as a decimal number, with Sunday as the first day of the week (00..53).

      %w

      Weekday as a decimal number (0..6; with Sunday being 0).

      %W

      Week of the year as a decimal number, with Monday as the first day of the week (00..53).

      %x

      Date representation for the current locale.

      %X

      Time representation for the current locale.

      %y

      Year without century, as a decimal number (0..99).

      %Y

      Year with the century, as a decimal number.

      %%z %Z

      Time-zone name or abbreviation; no characters if the time zone is unknown.

      %%

      Percent sign.

      Format flags

      The # flag may prefix any formatting code. In that case, the meaning of the format code is changed to as follows.

      %#a %#A %#b %#B %#p %#X %#z %#Z %#%

      # flag is ignored.

      %#c

      Long date and time representation, appropriate for the current locale. For example: "Tuesday, March 14, 1995, 12:41:29".

      %#x

      Long date representation, appropriate to current locale. For example: "Tuesday, March 14, 1995".

      %#d %#H %#I %#j %#m %#M %#S %#U %#w %#W %#y %#Y

      Removes leading zeros (if any).