GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
DBMI Library (base) - datetime conversions. More...
Go to the source code of this file.
Functions | |
int | db_convert_value_datetime_into_string (dbValue *value, int sqltype, dbString *string) |
Convert datetime value into string. More... | |
int | db_convert_Cstring_to_value_datetime (const char *buf, int sqltype, dbValue *value) |
Convert datetime string to value. More... | |
DBMI Library (base) - datetime conversions.
(C) 1999-2009, 2011 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file datetime.c.
int db_convert_Cstring_to_value_datetime | ( | const char * | buf, |
int | sqltype, | ||
dbValue * | value | ||
) |
Convert datetime string to value.
The format of buf must be as follows
buf | input string buffer | |
sqltype | SQL data type | |
[out] | value | pointer to dbValue to be set |
Definition at line 197 of file datetime.c.
References DB_DAY, DB_FRACTION, DB_HOUR, db_interval_range(), DB_MINUTE, DB_MONTH, db_nocase_compare(), DB_OK, DB_SECOND, db_set_value_datetime_current(), db_set_value_day(), db_set_value_hour(), db_set_value_minute(), db_set_value_month(), db_set_value_seconds(), db_set_value_year(), DB_SQL_TYPE_DATE, DB_SQL_TYPE_TIME, DB_SQL_TYPE_TIMESTAMP, and DB_YEAR.
Convert datetime value into string.
value | pointer to dbValue | |
sqltype | SQL data type | |
[out] | string | pointer to dbString |
Definition at line 31 of file datetime.c.
References db_get_value_day(), db_get_value_hour(), db_get_value_minute(), db_get_value_month(), db_get_value_seconds(), db_get_value_year(), db_interval_range(), DB_MONTH, db_set_string(), db_test_value_datetime_current(), and DB_YEAR.
Referenced by db_convert_value_to_string().