OpenPetra
Free Administration Software for Non-Profits
|
some static methods for the save conversion of dates to objects and objects to dates More...
Static Public Member Functions | |
static DateTime | ObjectToDate (object ADateObject) |
Converts a date value that is stored in a TObject to a DateTime value that is guaranteed to be valid. More... | |
static DateTime | ObjectToDate (object ADateObject, TNullHandlingEnum ANullHandling) |
Converts a date value that is stored in a object to a DateTime value that is guaranteed to be valid. More... | |
static DateTime | DateColumnToDate (DataColumn ADataColumn, DataRow ADataRow) |
Converts a DataColumn that holds a DateTime into a DateTime that is guaranteed to be valid. More... | |
static DateTime | DateColumnToDate (DataColumn ADataColumn, DataRow ADataRow, TNullHandlingEnum ANullHandling) |
Converts a DataColumn that holds a DateTime into a DateTime that is guaranteed to be valid. More... | |
static String | StringColumnToString (DataColumn ADataColumn, DataRow ADataRow) |
Converts a DataColumn that holds a String into a String that is guaranteed to be valid. More... | |
some static methods for the save conversion of dates to objects and objects to dates
|
inlinestatic |
Converts a DataColumn that holds a DateTime into a DateTime that is guaranteed to be valid.
In case the date value in the DataColumn is DBNull, the lowest possible date is returned.
@comment Very useful for DataColumns in Typed DataTables that are of DateTime type. Using this function, no Exception is thrown when trying to get the value of a DataColumn of Type DateTime that is DBNull.
ADataColumn | DataColumn of Type DateTime |
ADataRow | DataRow in which the value is found |
|
inlinestatic |
Converts a DataColumn that holds a DateTime into a DateTime that is guaranteed to be valid.
In case the date value in the DataColumn is DBNull, the lowest possible date is returned.
@comment Very useful for DataColumns in Typed DataTables that are of DateTime type. Using this function, no Exception is thrown when trying to get the value of a DataColumn of Type DateTime that is DBNull.
ADataColumn | DataColumn of Type DateTime |
ADataRow | DataRow in which the value is found |
ANullHandling | Switch to return either the lowest (nhReturnLowestDate) or the highest (nhReturnHighestDate) possible date in case the date value in the TObject is empty |
|
inlinestatic |
Converts a date value that is stored in a TObject to a DateTime value that is guaranteed to be valid.
In case the date value in the TObject is empty, the lowest possible date is returned.
@comment Very useful for untyped data in DataSets that is known to be of DateTime type.
ADateObject | TObject containing a date value |
|
inlinestatic |
Converts a date value that is stored in a object to a DateTime value that is guaranteed to be valid.
In case the date value in the object is empty, either the lowest or the highest possible date is returned.
@comment Very useful for untyped data in DataSets that is known to be of DateTime type.
ADateObject | TObject containing a date value |
ANullHandling | Switch to return either the lowest (nhReturnLowestDate) or the highest (nhReturnHighestDate) possible date in case the date value in the TObject is empty |
|
inlinestatic |
Converts a DataColumn that holds a String into a String that is guaranteed to be valid.
In case the String value in the DataColumn is DBNull, an empty String ('') is returned.
@comment Very useful for DataColumns in Typed DataTables that are of String type. Using this function, no Exception is thrown when trying to get the value of a DataColumn of Type String that is DBNull.
ADataColumn | DataColumn of Type DateTime |
ADataRow | DataRow in which the value is found |