Xbasic

A5_T_FROM_RFCDATE Function

Syntax

Date_Time_Value as T = a5_t_from_rfcdate(C date_string )

Arguments

Date_Time_Value

A date time value in the format: 03/30/0004 04:17:55 00 pm

date_string

A formatted date. Character

Description

Converts a time in RFC 822, RFC 850, RFC 1123 or ANSI C format to a time variable

Discussion

The A5_T_FROM_RFCDATE() function converts a date time string in RFC 822, RFC 850, RFC 1123 or ANSI C formats to a Time variable. This function will automatically determine the format of the input string and handle the conversion appropriately.

Example

dim t as T
t = now()
? a5_t_from_rfcdate(a5_rfc822date(t))
= 03/30/0004 04:17:55 00 pm
? a5_t_from_rfcdate(a5_rfc850date(t))
= 03/30/0004 04:17:55 00 pm
? a5_t_from_rfcdate(a5_rfc1123date(t))
= 03/30/2004 04:17:55 00 pm
? a5_t_from_rfcdate(a5_ansidate(t))
= 03/30/2004 11:17:55 00 am

See Also