Xbasic
httpdate Function
Syntax
DateStr as C = httpdate(date as C)
DateStr as C = httpdate(date as D)
DateStr as C = httpdate(date as T)
Arguments
- dateCharacter Date Time
The date to convert. The date can be specifeid as a Date, Datetime, or Character object.
Returns
- DateStrCharacter
An HTTP compliant formatted date/time string.
Description
Creates an HTTP compliant date/time string
Example
'Converting date string to HTTP Date dim todayC as C = "2/23/2017 11:06 AM" ? todayC = "2/23/2017 11:06 AM" ? httpdate(todayC) = "Thu, 23 Feb 2017 16:06:00 GMT" 'Converting date to HTTP Date dim todayD as d = date() ? todayD = {02/23/2017} ? httpdate(todayD) = "Thu, 23 Feb 2017 05:00:00 GMT" 'Converting Datetime to HTTP Date dim todayDT as T = now() ? todayDT = 02/23/2017 11:06:22 01 am ? httpdate(todayDT) = "Thu, 23 Feb 2017 16:06:22 GMT"