Class

# WebListBoxDateTimeRenderer

<div class="rst-class">

forsearch

</div>

Listbox

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used to display a `DateTime</api/data_types/datetime>` value in `WebListBox</api/user_interface/web/weblistbox>` cell in the browser's time zone and locale.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                                | Type                                                                  | Read-Only | Shared |
|---------------------------------------------------------------------|-----------------------------------------------------------------------|-----------|--------|
| `DateFormat<weblistboxdatetimerenderer.dateformat>`                 | `DateTime.FormatStyles<datetime.formatstyles>`                        |           |        |
| `RelativeValueStyle<weblistboxdatetimerenderer.relativevaluestyle>` | `RelativeValueStyles<weblistboxdatetimerenderer.relativevaluestyles>` |           |        |
| `TimeFormat<weblistboxdatetimerenderer.timeformat>`                 | `DateTime.FormatStyles<datetime.formatstyles>`                        |           |        |
| `Value<weblistboxdatetimerenderer.value>`                           | `DateTime</api/data_types/datetime>`                                  |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                   | Parameters                                                                                                                                                                        | Returns | Shared |
|--------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<weblistboxdatetimerenderer.constructor0>` | value As `DateTime</api/data_types/datetime>`                                                                                                                                     |         |        |
| `Constructor<weblistboxdatetimerenderer.constructor1>` | dateValue As `String</api/data_types/string>`, locale As `Locale</api/os/locale>` = `Nil</api/language/nil>`, timeZone As `TimeZone</api/os/timezone>` = `Nil</api/language/nil>` |         |        |

## Enumerations

<div id="weblistboxdatetimerenderer.relativevaluestyles">

<div class="rst-class">

forsearch

</div>

</div>

WebListBoxDateTimeRenderer.RelativeValueStyles

### RelativeValueStyles

> The options for showing the date or time in relative terms.
>
> | Enum         | Description                                                                                                                                                                                |
> |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
> | None         | Both the date and time will be displayed in absolute terms.                                                                                                                                |
> | RelativeDate | The DateTime will be displayed in date-relative terms. For example, if the DateTime was yesterday at 5:40PM, the value would be displayed as "Yesterday at 5:40PM"                         |
> | RelativeTime | The DateTime will be displayed in time-relative terms. For example, if the DateTime was 3 months ago at 5:40PM, the value would be displayed as "3 months ago". RelativeTime has no limit. |

## Property descriptions

<div id="weblistboxdatetimerenderer.dateformat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebListBoxDateTimeRenderer.DateFormat

**DateFormat** As `DateTime.FormatStyles<datetime.formatstyles>`

> The `format<datetime.formatstyles>` in which the date portion of the `Value<weblistboxdatetimerenderer.value>` property will be displayed.

<div id="weblistboxdatetimerenderer.relativevaluestyle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebListBoxDateTimeRenderer.RelativeValueStyle

**RelativeValueStyle** As `RelativeValueStyles<weblistboxdatetimerenderer.relativevaluestyles>`

> Determines if the date and/or time will be display in relative terms.
>
> Using this property you can automatically display the DateTime using relative terms when appropriate. For example, if the `DateTime</api/data_types/datetime>` value was yesterday, the value will be displayed as "Yesterday" rather than as an actual date and a time that was 5 minutes ago would be displayed as "5 Minutes Ago".

<div id="weblistboxdatetimerenderer.timeformat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebListBoxDateTimeRenderer.TimeFormat

**TimeFormat** As `DateTime.FormatStyles<datetime.formatstyles>`

> The `format<datetime.formatstyles>` in which the time portion of the `Value<weblistboxdatetimerenderer.value>` property will be displayed.

<div id="weblistboxdatetimerenderer.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebListBoxDateTimeRenderer.Value

**Value** As `DateTime</api/data_types/datetime>`

> The `DateTime</api/data_types/datetime>` value.

## Method descriptions

<div id="weblistboxdatetimerenderer.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebListBoxDateTimeRenderer.Constructor

**Constructor**(value As `DateTime</api/data_types/datetime>`)

> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> `Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.
>
> </div>
>
> Creates an object from the *value* passed.

<div id="weblistboxdatetimerenderer.constructor1">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebListBoxDateTimeRenderer.Constructor

**Constructor**(dateValue As `String</api/data_types/string>`, locale As `Locale</api/os/locale>` = `Nil</api/language/nil>`, timeZone As `TimeZone</api/os/timezone>` = `Nil</api/language/nil>`)

> Creates a <span class="title-ref">WebListBoxDateTimeRenderer</span> from the values passed.

## Notes

Assigning a `DateTime</api/data_types/datetime>` value using this class will automatically convert the `DateTime</api/data_types/datetime>` to the browser's time zone and locale-specific format.

Using the `RelativeValueStyle<weblistboxdatetimerenderer.relativevaluestyle>` property, you can automatically display the `DateTime</api/data_types/datetime>` using relative terms when appropriate. For example, if the `DateTime</api/data_types/datetime>` value was yesterday, the value will be displayed as "Yesterday" rather than as an actual date and a time that was 5 minutes ago would be displayed as "5 Minutes Ago".

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | Web |
| **Operating Systems** | All |

<div class="seealso">

`WebListBoxCellRenderer</api/web/weblistboxcellrenderer>` parent class; `WebListBox</api/user_interface/web/weblistbox>` control; `WebListBoxCellRenderer</api/web/weblistboxcellrenderer>`, `WebListBoxImageRenderer</api/web/weblistboximagerenderer>`, and `WebListBoxStyleRenderer</api/web/weblistboxstylerenderer>` classes.

</div>
