prg_date_from_string_convert_tz()
Abstract
Converts the string representation of a date in a given time zone to PrgT_Date.
Syntax
prg_date_from_string_convert_tz (date_time_string, time_zone, string_format, options, date_time_ptr)
| Argument | Type | Description |
|---|---|---|
date_time_string |
const char * |
Date string to convert (must not be empty). |
time_zone |
PrgT_Timezone_Name |
Time zone used by date_time_string; one of the symbolic constants given in Table 1. |
string_format |
PrgT_Date_String_Format |
Format of date_time_string (see Details). |
options |
int |
Conversion options (see Details). |
date_time_ptr |
PrgT_Date * |
Object to receive converted date (must not be NULL). |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if the conversion is successful; PrgC_Compcode_Failure otherwise.
Header
prg_date.h
Details
This function converts a string representation of a date to a PrgT_Date object.
date_time_string is in the specified time_zone. The returned PrgT_Date object represents the date and time converted to the computer’s local time (unless specified otherwise by options).
string_format specifies the format of the string. This must be PrgC_Date_String_Format_Standard, which specifies a string in the C standard format: “12:34:56.789 Mar 19 2008”.
options must be either 0 or one of the following symbolic constants:
PRGC_DATE_OPT_USE_TIMEZONE_PREF—convert to the time zone specified by the timezone preferencePRGC_DATE_OPT_INCLUDE_TIMEZONE_STR—include the time zone in the returned stringPRGC_DATE_OPT_INCLUDE_TIMEZONE_STR_USE_PREF—convert to the time zone specified by the timezone preference and include the time zone in the returned string