![]() ![]() Returns the timestamp calculated by adding integer_exp intervals of type interval to timestamp_exp. TIMESTAMPADD( interval, integer_exp, timestamp_exp ) (ODBC 2.0) Returns the second based on the second field in time_exp as an integer value in the range of 0-59. Returns the quarter in date_exp as an integer value in the range of 1-4, where 1 represents January 1 through March 31. Returns current date and time as a timestamp value. for a data source that uses English, or Januar through Dezember for a data source that uses German) for the month portion of date_exp. Returns a character string containing the data source-specific name of the month (for example, January through December or Jan. Returns the month based on the month field in date_exp as an integer value in the range of 1-12. Returns the minute based on the minute field in time_exp as an integer value in the range of 0-59. Returns the hour based on the hour field in time_exp as an integer value in the range of 0-23. ![]() The scale is 0 unless SECOND is specified, in which case the scale is not less than the fractional seconds precision of the extract-source field. The extract-field argument can be one of the following keywords: YEAR MONTH DAY HOUR MINUTE SECOND The precision of the returned value is implementation-defined. The extract-source argument is a datetime or interval expression. Returns the extract-field portion of the extract-source. Returns the day of the year based on the year field in date_exp as an integer value in the range of 1-366.ĮXTRACT( extract-field FROM extract-source ) (ODBC 3.0) ![]() Returns the day of the week based on the week field in date_exp as an integer value in the range of 1-7, where 1 represents Sunday. Returns the day of the month based on the month field in date_exp as an integer value in the range of 1-31. for a data source that uses English, or Sonntag through Samstag for a data source that uses German) for the day portion of date_exp. Returns a character string containing the data source-specific name of the day (for example, Sunday through Saturday or Sun. The timestamp-precision argument determines the seconds precision of the returned timestamp. Returns the current local date and local time as a timestamp value. The time-precision argument determines the seconds precision of the returned value.ĬURRENT_TIMESTAMP (ODBC 3.0) The CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP timedate scalar functions have been added in ODBC 3.0 to align with SQL-92. An application can determine which time and date functions are supported by a driver by calling SQLGetInfo with an information type of SQL_TIMEDATE_FUNCTIONS.Īrguments denoted as timestamp_exp can be the name of a column, the result of another scalar function, or an ODBC-time-escape, ODBC-date- escape, or ODBC-timestamp-escape, where the underlying data type could be represented as SQL_CHAR, SQL_VARCHAR, SQL_TYPE_TIME, SQL_TYPE_DATE, or SQL_TYPE_TIMESTAMP.Īrguments denoted as date_exp can be the name of a column, the result of another scalar function, or an ODBC-date- escape or ODBC-timestamp-escape, where the underlying data type could be represented as SQL_CHAR, SQL_VARCHAR, SQL_TYPE_DATE, or SQL_TYPE_TIMESTAMP.Īrguments denoted as time_exp can be the name of a column, the result of another scalar function, or an ODBC-time-escape or ODBC-timestamp-escape, where the underlying data type could be represented as SQL_CHAR, SQL_VARCHAR, SQL_TYPE_TIME, or SQL_TYPE_TIMESTAMP. The following table lists time and date functions that are included in the ODBC scalar function set. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |