This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page. class


HTTP Date header field


A DateField object represents an HTTP Date header field. A Date field is an optional field that represents the date and time a request or a response message was originally sent. If you do not specify a Date field in a request message, then MATLAB® inserts one when you send it.


obj = creates a Date header field with the Value property set to value.

obj = sets the field value to the current date and time.


expand all

Header field name, specified as 'Date'.

Date and time, specified as a datetime object or a string in a valid HTTP date format. The default is the current date and time. Value must not be in the future. If the time zone is missing, the local time zone is assumed. The datetime Format property is ignored.



Value of Date field as array of MATLAB datetime objects. Interprets field as a comma-separated list of quoted HTTP dates.

Introduced in R2016b

Was this topic helpful?