DateRFC1123 Method

Converts a date or date/time value to the date format used in the Internet according RFC 1123.

Syntax

cDate = Response.DateRFC1123( tDate|dDate )

Parameter

tDate | dDate

The transmitted value may be a date or a date/time value. The transmitted value must be valid and must not be empty or NIL, as that would trigger an error. If a date is transmitted, the current time of the server will be inserted in the time component. We therefore recommend the use of a date/time value at all times.

Return value

A date/time value is returned as a character string. The time is always displayed in the 24-hour format Thus, at the time of this writing, code like this

<%

   ? Response.DateRFC1123( DATETIME() )

%>

would create the following output

Fri, 12 Mar 2004 22:36:45 GMT

This date format is used in many HTTP headers as e.g. in the keyword Expires that lets you define the validity of a document transported via HTTP. This date format is also used in the SMTP protocol during transmission of e-mails. The RFC 1123 format is not used to define the validity dates of cookies. For this purpose a slightly modified variant is used where minus signs are used within the date in lieu of blanks.

See also

Response.CookieDate()