|
OCILIB (C and C++ Driver for Oracle)
4.0.0
|
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_EXPORT OCI_Date *OCI_API | OCI_DateCreate (OCI_Connection *con) |
| Create a local date object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateFree (OCI_Date *date) |
| Free a date object. More... | |
| OCI_EXPORT OCI_Date **OCI_API | OCI_DateArrayCreate (OCI_Connection *con, unsigned int nbelem) |
| Create an array of date object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateArrayFree (OCI_Date **dates) |
| Free an array of date objects. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateAddDays (OCI_Date *date, int nb) |
| Add or subtract days to a date handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateAddMonths (OCI_Date *date, int nb) |
| Add or subtract months to a date handle. More... | |
| OCI_EXPORT int OCI_API | OCI_DateAssign (OCI_Date *date, OCI_Date *date_src) |
| Assign the value of a date handle to another one. More... | |
| OCI_EXPORT int OCI_API | OCI_DateCheck (OCI_Date *date) |
| Check if the given date is valid. More... | |
| OCI_EXPORT int OCI_API | OCI_DateCompare (OCI_Date *date, OCI_Date *date2) |
| Compares two date handles. More... | |
| OCI_EXPORT int OCI_API | OCI_DateDaysBetween (OCI_Date *date, OCI_Date *date2) |
| Return the number of days betWeen two dates. More... | |
| OCI_EXPORT 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. More... | |
| OCI_EXPORT 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. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateGetDate (OCI_Date *date, int *year, int *month, int *day) |
| Extract the date part from a date handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateGetTime (OCI_Date *date, int *hour, int *min, int *sec) |
| Extract the time part from a date handle. More... | |
| OCI_EXPORT 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. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateSetDate (OCI_Date *date, int year, int month, int day) |
| Set the date portion if the given date handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateSetTime (OCI_Date *date, int hour, int min, int sec) |
| Set the time portion if the given date handle. More... | |
| OCI_EXPORT 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. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateLastDay (OCI_Date *date) |
| Place the last day of month (from the given date) into the given date. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateNextDay (OCI_Date *date, const otext *day) |
| Gets the date of next day of the week, after a given date. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateSysDate (OCI_Date *date) |
| Return the current system date/time into the date handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_DateZoneToZone (OCI_Date *date, const otext *zone1, const otext *zone2) |
| Convert a date from one zone to another zone. More... | |
| OCI_EXPORT 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. More... | |
| OCI_EXPORT 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. More... | |
| OCI_EXPORT OCI_Date* OCI_API OCI_DateCreate | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Create a local date object.
| con | - Connection handle |
Referenced by ocilib::Date::Date().
| OCI_EXPORT boolean OCI_API OCI_DateFree | ( | OCI_Date * | date | ) |
#include <ocilib.h>
Free a date object.
| date | - Date handle |
Referenced by ocilib::Date::Date().
| OCI_EXPORT OCI_Date** OCI_API OCI_DateArrayCreate | ( | OCI_Connection * | con, |
| unsigned int | nbelem | ||
| ) |
#include <ocilib.h>
Create an array of date object.
| con | - Connection handle |
| nbelem | - number of elements in the array |
| OCI_EXPORT boolean OCI_API OCI_DateArrayFree | ( | OCI_Date ** | dates | ) |
#include <ocilib.h>
Free an array of date objects.
| dates | - Array of date objects |
| OCI_EXPORT boolean OCI_API OCI_DateAddDays | ( | OCI_Date * | date, |
| int | nb | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateAddMonths | ( | OCI_Date * | date, |
| int | nb | ||
| ) |
#include <ocilib.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 <ocilib.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_EXPORT int OCI_API OCI_DateCheck | ( | OCI_Date * | date | ) |
#include <ocilib.h>
Check if the given date is valid.
| date | - Date handle |
Referenced by ocilib::Date::IsValid().
#include <ocilib.h>
Compares two date handles.
| date | - Date1 handle |
| date2 | - Date2 handle |
#include <ocilib.h>
Return the number of days betWeen two dates.
| date | - Date1 handle |
| date2 | - Date2 handle |
Referenced by ocilib::Date::DaysBetween().
| OCI_EXPORT boolean OCI_API OCI_DateFromText | ( | OCI_Date * | date, |
| const otext * | str, | ||
| const otext * | fmt | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateToText | ( | OCI_Date * | date, |
| const otext * | fmt, | ||
| int | size, | ||
| otext * | str | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateGetDate | ( | OCI_Date * | date, |
| int * | year, | ||
| int * | month, | ||
| int * | day | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateGetTime | ( | OCI_Date * | date, |
| int * | hour, | ||
| int * | min, | ||
| int * | sec | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateGetDateTime | ( | OCI_Date * | date, |
| int * | year, | ||
| int * | month, | ||
| int * | day, | ||
| int * | hour, | ||
| int * | min, | ||
| int * | sec | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateSetDate | ( | OCI_Date * | date, |
| int | year, | ||
| int | month, | ||
| int | day | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateSetTime | ( | OCI_Date * | date, |
| int | hour, | ||
| int | min, | ||
| int | sec | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateSetDateTime | ( | OCI_Date * | date, |
| int | year, | ||
| int | month, | ||
| int | day, | ||
| int | hour, | ||
| int | min, | ||
| int | sec | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateLastDay | ( | OCI_Date * | date | ) |
#include <ocilib.h>
Place the last day of month (from the given date) into the given date.
| date | - Date handle |
Referenced by ocilib::Date::LastDay().
| OCI_EXPORT boolean OCI_API OCI_DateNextDay | ( | OCI_Date * | date, |
| const otext * | day | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateSysDate | ( | OCI_Date * | date | ) |
#include <ocilib.h>
Return the current system date/time into the date handle.
| date | - Date handle |
Referenced by ocilib::Date::SysDate().
| OCI_EXPORT boolean OCI_API OCI_DateZoneToZone | ( | OCI_Date * | date, |
| const otext * | zone1, | ||
| const otext * | zone2 | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateToCTime | ( | OCI_Date * | date, |
| struct tm * | ptm, | ||
| time_t * | pt | ||
| ) |
#include <ocilib.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_EXPORT boolean OCI_API OCI_DateFromCTime | ( | OCI_Date * | date, |
| struct tm * | ptm, | ||
| time_t | t | ||
| ) |
#include <ocilib.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 |
Both parameters 'ptm' and 'p' are optional but one of them has to be provided. If 'ptm' is not null, its value is affected to the OCI_Timestamp handle, otherwise the value of 't' is used.