DateTimeToHTTP

Mon 01 January 2018

Syntax

DateTimeToHTTP(datetime)

Description

Use the DateTimeToHTTP function to convert any DateTime value to a date/time string in the format specified by HTTP 1.0 and 1.1 standards.

Note: Because the HTTP protocol is used to interchange information between diverse computing systems, the value returned from this function is always the ”US English” form of weekdays and months. If you want the value to use the localized form, use the DateTimeToLocalizeString function instead.

The standard HTTP date/time has the following fixed length format:

<dow><,><sp><dd><sp><mon><sp><year><sp><hh><:><mm><:><ss><sp><GMT>

where:

Value

Description

<dow>

a 3-character day of week name, one of Sun, Mon, Tue, Wed, Thu, Fri, Sat.

<,>

a literal comma character

<sp>

a literal space character

<dd>

a 2-digit day of month, such as 02 or 22.

<mon>

is a 3-character month name, one of Jan, Feb, Mar, and so on.

<year>

a 4-digit year number

<hh>

a 24-hour hour number, such as 00 or 13

<mm>

a 2-digit minute number, such as 01 or 56

<ss>

a 2-digit second number, such as 03 or 59

<GMT>

a literal 3-character GMT.

As indicated by the trailing GMT, this date/time format is always expressed in GMT (or UTC, which is declared to be the same for the purposes of HTTP).

Parameters

Field or Control

Definition

datetime

Specify the DateTime value you want converted to HTTP format. This DateTime is assumed to be in the base time zone of the installation.

Returns

A string containing the converted HTTP date/time.