The following is an example of an ANSI date literal:Īlternatively, you can specify an Oracle Database date value as shown in the following example: For each DATE value, Oracle Database stores the following information: century, year, month, date, hour, minute, and second.Ĭonverting a character or numeric value to a date value with the TO_DATE functionĪ date can be specified as an ANSI date literal or as an Oracle Database date value.Īn ANSI date literal contains no time portion and must be specified in exactly the following format: Although date and time information can be represented in both character and number data types, the DATE data type has special associated properties. The DATE data type stores date and time information. The following sections describe the datetime data types and interval data types in more detail: TIMESTAMP WITH LOCAL TIME ZONE does not store time zone information internally, but you can see local time zone information in SQL output if the TZH:TZM or TZR TZD format elements are specified. TIMESTAMP WITH TIME ZONE also includes these fields: The fields that apply to all Oracle Database datetime and interval data types are: The values of these fields determine the value of the data type. Values of interval data types are sometimes called intervals.īoth datetimes and intervals are made up of fields. ![]() The interval data types are INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND. Values of datetime data types are sometimes called datetimes. ![]() The datetime data types are DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, and TIMESTAMP WITH LOCAL TIME ZONE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |