prg_date_range_to_string_convert()
Abstract
Converts PrgT start and end date objects to a date range string.
Syntax
prg_date_range_to_string_convert (start_date_time, end_date_time, string_format, options, date_time_range_string, buffer_len)
| Argument | Type | Description |
|---|---|---|
start_date_time |
PrgT_Date |
Start time. |
end_date_time |
PrgT_Date |
End time. |
string_format |
PrgT_Date_String_Format |
Desired string format (see Details). |
options |
int |
Unused. |
date_time_range_string |
char * |
Buffer to hold converted string. |
buffer_len |
int * |
Size of date_time_range_string buffer.If date_time_range_string is too small to hold the converted string, this value is set to the required size and PrgC_Compcode_Failure is returned. |
Return Type
PrgT_Compcode
PrgC_Compcode_Failure if the inputs are not valid or the buffer size is not sufficient; PrgC_Compcode_Success otherwise.
Header
prg_date.h
Details
This function converts two PrgT_Date objects to string representation as a date range. Any information that is common to both dates is not repeated in the date range string. For example:
- Start Date: 11:37:44.000 Dec 23 2011
- End Date: 12:37:44.000 Dec 23 2011
- Date Range String: 11:37:44.000 - 12:37:44.000 Dec 23 2011
The returned string represents the date and time in the same time zone as date_time; no time zone conversion is done.
string_format specifies the desired format of the string. This must be PrgC_Date_String_Format_Standard, which produces a string in the C standard format: “12:34:56.789 Mar 19 2008”.