OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiOracleNumber
OCILIB encapsulates Oracle SQL Date data type within OCI_Date structure
Basically, the OCI_Date routines are wrappers around the Oracle OCIDate APIs
Functions | |
OCI_SYM_PUBLIC OCI_Date *OCI_API | OCI_DateCreate (OCI_Connection *con) |
Create a local date object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateFree (OCI_Date *date) |
Free a date object. | |
OCI_SYM_PUBLIC OCI_Date **OCI_API | OCI_DateArrayCreate (OCI_Connection *con, unsigned int nbelem) |
Create an array of date object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateArrayFree (OCI_Date **dates) |
Free an array of date objects. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateAddDays (OCI_Date *date, int nb) |
Add or subtract days to a date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateAddMonths (OCI_Date *date, int nb) |
Add or subtract months to a date handle. | |
OCI_SYM_PUBLIC int OCI_API | OCI_DateAssign (OCI_Date *date, OCI_Date *date_src) |
Assign the value of a date handle to another one. | |
OCI_SYM_PUBLIC int OCI_API | OCI_DateCheck (OCI_Date *date) |
Check if the given date is valid. | |
OCI_SYM_PUBLIC int OCI_API | OCI_DateCompare (OCI_Date *date, OCI_Date *date2) |
Compares two date handles. | |
OCI_SYM_PUBLIC int OCI_API | OCI_DateDaysBetween (OCI_Date *date, OCI_Date *date2) |
Return the number of days betWeen two dates. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateFromText (OCI_Date *date, const otext *str, const otext *fmt) |
Convert a string to a date and store it in the given date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateToText (OCI_Date *date, const otext *fmt, int size, otext *str) |
Convert a Date value from the given date handle to a string. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateGetDate (OCI_Date *date, int *year, int *month, int *day) |
Extract the date part from a date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateGetTime (OCI_Date *date, int *hour, int *min, int *sec) |
Extract the time part from a date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateGetDateTime (OCI_Date *date, int *year, int *month, int *day, int *hour, int *min, int *sec) |
Extract the date and time parts from a date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateSetDate (OCI_Date *date, int year, int month, int day) |
Set the date portion if the given date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateSetTime (OCI_Date *date, int hour, int min, int sec) |
Set the time portion if the given date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateSetDateTime (OCI_Date *date, int year, int month, int day, int hour, int min, int sec) |
Set the date and time portions if the given date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateLastDay (OCI_Date *date) |
Place the last day of month (from the given date) into the given date. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateNextDay (OCI_Date *date, const otext *day) |
Gets the date of next day of the week, after a given date. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateSysDate (OCI_Date *date) |
Return the current system date/time into the date handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateZoneToZone (OCI_Date *date, const otext *zone1, const otext *zone2) |
Convert a date from one zone to another zone. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateToCTime (OCI_Date *date, struct tm *ptm, time_t *pt) |
Affect an OCI_Date handle value to ISO C time data types. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DateFromCTime (OCI_Date *date, struct tm *ptm, time_t t) |
Affect ISO C time data types values to an OCI_Date handle. | |
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_DateCreate | ( | OCI_Connection * | con | ) |
#include <api.h>
Create a local date object.
con | - Connection handle |
OCI_SYM_PUBLIC boolean OCI_API OCI_DateFree | ( | OCI_Date * | date | ) |
#include <api.h>
Free a date object.
date | - Date handle |
OCI_SYM_PUBLIC OCI_Date **OCI_API OCI_DateArrayCreate | ( | OCI_Connection * | con, |
unsigned int | nbelem | ||
) |
#include <api.h>
Create an array of date object.
con | - Connection handle |
nbelem | - number of elements in the array |
OCI_SYM_PUBLIC boolean OCI_API OCI_DateArrayFree | ( | OCI_Date ** | dates | ) |
#include <api.h>
Free an array of date objects.
dates | - Array of date objects |
OCI_SYM_PUBLIC boolean OCI_API OCI_DateAddDays | ( | OCI_Date * | date, |
int | nb | ||
) |
#include <api.h>
Add or subtract days to a date handle.
date | - Date handle |
nb | - Number of days to add/remove |
Referenced by ocilib::Date::AddDays().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateAddMonths | ( | OCI_Date * | date, |
int | nb | ||
) |
#include <api.h>
Add or subtract months to a date handle.
date | - Date handle |
nb | - Number of months to add/remove |
Referenced by ocilib::Date::AddMonths().
#include <api.h>
Assign the value of a date handle to another one.
date | - Destination Date handle |
date_src | - Source Date handle |
Referenced by ocilib::Date::Clone().
OCI_SYM_PUBLIC int OCI_API OCI_DateCheck | ( | OCI_Date * | date | ) |
#include <api.h>
Check if the given date is valid.
date | - Date handle |
Referenced by ocilib::Date::IsValid().
#include <api.h>
Compares two date handles.
date | - Date1 handle |
date2 | - Date2 handle |
#include <api.h>
Return the number of days betWeen two dates.
date | - Date1 handle |
date2 | - Date2 handle |
The number of days is the difference of (date2 - date)
Referenced by ocilib::Date::DaysBetween().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateFromText | ( | OCI_Date * | date, |
const otext * | str, | ||
const otext * | fmt | ||
) |
#include <api.h>
Convert a string to a date and store it in the given date handle.
date | - Destination Date handle |
str | - Source date string |
fmt | - Date format |
Referenced by ocilib::Date::FromString().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateToText | ( | OCI_Date * | date, |
const otext * | fmt, | ||
int | size, | ||
otext * | str | ||
) |
#include <api.h>
Convert a Date value from the given date handle to a string.
date | - source Date handle |
fmt | - Date format |
size | - Destination string size in characters |
str | - Destination date string |
Referenced by ocilib::Date::ToString().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateGetDate | ( | OCI_Date * | date, |
int * | year, | ||
int * | month, | ||
int * | day | ||
) |
#include <api.h>
Extract the date part from a date handle.
date | - Date handle |
year | - Place holder for year value |
month | - Place holder for month value |
day | - Place holder for day value |
Referenced by ocilib::Date::GetDate().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateGetTime | ( | OCI_Date * | date, |
int * | hour, | ||
int * | min, | ||
int * | sec | ||
) |
#include <api.h>
Extract the time part from a date handle.
date | - Date handle |
hour | - Place holder for hour value |
min | - Place holder for minute value |
sec | - Place holder for second value |
Referenced by ocilib::Date::GetTime().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateGetDateTime | ( | OCI_Date * | date, |
int * | year, | ||
int * | month, | ||
int * | day, | ||
int * | hour, | ||
int * | min, | ||
int * | sec | ||
) |
#include <api.h>
Extract the date and time parts from a date handle.
date | - Date handle |
year | - Place holder for year value |
month | - Place holder for month value |
day | - Place holder for day value |
hour | - Place holder for hour value |
min | - Place holder for minute value |
sec | - Place holder for second value |
Referenced by ocilib::Date::GetDateTime().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateSetDate | ( | OCI_Date * | date, |
int | year, | ||
int | month, | ||
int | day | ||
) |
#include <api.h>
Set the date portion if the given date handle.
date | - Date handle |
year | - Year value |
month | - Month value |
day | - Day value |
Referenced by ocilib::Date::SetDate().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateSetTime | ( | OCI_Date * | date, |
int | hour, | ||
int | min, | ||
int | sec | ||
) |
#include <api.h>
Set the time portion if the given date handle.
date | - Date handle |
hour | - Hour value |
min | - Minute value |
sec | - Second value |
Referenced by ocilib::Date::SetTime().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateSetDateTime | ( | OCI_Date * | date, |
int | year, | ||
int | month, | ||
int | day, | ||
int | hour, | ||
int | min, | ||
int | sec | ||
) |
#include <api.h>
Set the date and time portions if the given date handle.
date | - Date handle |
year | - Year value |
month | - Month value |
day | - Day value |
hour | - Hour value |
min | - Minute value |
sec | - Second value |
Referenced by ocilib::Date::SetDateTime().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateLastDay | ( | OCI_Date * | date | ) |
#include <api.h>
Place the last day of month (from the given date) into the given date.
date | - Date handle |
Referenced by ocilib::Date::LastDay().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateNextDay | ( | OCI_Date * | date, |
const otext * | day | ||
) |
#include <api.h>
Gets the date of next day of the week, after a given date.
date | - Date handle |
day | - Day of the week |
Referenced by ocilib::Date::NextDay().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateSysDate | ( | OCI_Date * | date | ) |
#include <api.h>
Return the current system date/time into the date handle.
date | - Date handle |
Referenced by ocilib::Date::SysDate().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateZoneToZone | ( | OCI_Date * | date, |
const otext * | zone1, | ||
const otext * | zone2 | ||
) |
#include <api.h>
Convert a date from one zone to another zone.
date | - Date handle |
zone1 | - Source zone |
zone2 | - Destination zone |
Referenced by ocilib::Date::ChangeTimeZone().
OCI_SYM_PUBLIC boolean OCI_API OCI_DateToCTime | ( | OCI_Date * | date, |
struct tm * | ptm, | ||
time_t * | pt | ||
) |
#include <api.h>
Affect an OCI_Date handle value to ISO C time data types.
date | - Date handle |
ptm | - Pointer to a structure tm to receive date/time values |
pt | - Pointer to a time_t to hold the date/time in the time_t format |
OCI_SYM_PUBLIC boolean OCI_API OCI_DateFromCTime | ( | OCI_Date * | date, |
struct tm * | ptm, | ||
time_t | t | ||
) |
#include <api.h>
Affect ISO C time data types values to an OCI_Date handle.
date | - Date handle |
ptm | - Pointer to a structure tm that hold the date/time value |
t | - Value (time_t) that hold the date/time in the time_t format |