Oracle PLSQL Language- P16
Số trang: 50
Loại file: pdf
Dung lượng: 183.70 KB
Lượt xem: 11
Lượt tải: 0
Xem trước 5 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu oracle plsql language- p16, công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Oracle PLSQL Language- P16 The default date format is also set implicitly with another initialization parameter, NLS_TERRITORY. When you specify an NLS_TERRITORY value, you set conventions for date format, date language, numeric formats, currency symbols, and week start day. Even with this flexibility, the database still supports only a single default date format in a given instance. Both developers and users must be aware of this format when working with dates. Later sections of this chapter explore approaches in PL/SQL that give the user much more flexibility when entering dates in their applications. As you can see, format masks (such as MMDDYY and Month DD, YYYY) play an important role in the conversion of date and character data. Table 14.2 provides the full set of date format masks and explains how to use them in all their variations. You can use the format elements in any combination, in any order. You can even use the same format element more than once in your format mask. Following the table are examples showing these variations. Table 14.2: Date Format Model Elements Mask Description SCC or CC The century. If the SCC format is used, any B.C. dates are prefaced with a hyphen (-). SYYYY or YYYY The four-digit year. If the SYYYY format is used, any B.C. dates are prefaced with a hyphen (-). IYYY The four-digit ISO standard year. YYY or YY or Y The last three, two, or one digits of the year. The current century is the default. IYY or IY or I The last three, two, or one digits of the ISO standard year. The current century is the default. Y,YYY The four-digit year with a comma. SYEAR or YEAR or SYear or The year spelled out. The S prefix places a negative sign in front Year of B.C. dates.Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. RR The last two digits of the year. This format is used to display years in centuries other than our own. See Section 14.3.3, RR: Changing Millenia. BC or AD The B.C. or A.D. indicator, without periods. B.C. or A.D. The B.C. or A.D. indicator, with periods. Q The quarter of the year, from 1 through 4. January through March are in the first quarter, April through June in second quarter, etc. MM The number of the month in the year, from 01 through 12. January is month number 01, September is 09, etc. RM The Roman numeral representation of the month number, from I through XII. January is I, September is IX, etc. MONTH or Month The name of the month, either in upper- or mixed-case format. MON or Mon The abbreviated name of the month, as in JAN for January. WW The week in the year, from 1 through 53. IW The week in the year, from 1 through 52 or 1 through 53, based on the ISO standard. W The week in the month, from 1 through 5. Week 1 starts on the first day of the month and ends on the seventh. DDD The day in the year, from 1 through 366. DD The day in the month, from 1 through 31.Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. D The day in the week, from 1 through 7. The day of the week that is decreed the first day is specified implicitly by the NLS_TERRITORY initialization parameter for the database instance. DAY or Day The name of the day in upper- or mixed-case format. DY The abbreviated name of the day, as in TUE for Tuesday. J The Julian day format of the date (counted as the number of days since January 1, 4712 B.C., the earliest date supported by the Oracle RDBMS). AM or PM The meridian indicator (morning or evening) ...
Nội dung trích xuất từ tài liệu:
Oracle PLSQL Language- P16 The default date format is also set implicitly with another initialization parameter, NLS_TERRITORY. When you specify an NLS_TERRITORY value, you set conventions for date format, date language, numeric formats, currency symbols, and week start day. Even with this flexibility, the database still supports only a single default date format in a given instance. Both developers and users must be aware of this format when working with dates. Later sections of this chapter explore approaches in PL/SQL that give the user much more flexibility when entering dates in their applications. As you can see, format masks (such as MMDDYY and Month DD, YYYY) play an important role in the conversion of date and character data. Table 14.2 provides the full set of date format masks and explains how to use them in all their variations. You can use the format elements in any combination, in any order. You can even use the same format element more than once in your format mask. Following the table are examples showing these variations. Table 14.2: Date Format Model Elements Mask Description SCC or CC The century. If the SCC format is used, any B.C. dates are prefaced with a hyphen (-). SYYYY or YYYY The four-digit year. If the SYYYY format is used, any B.C. dates are prefaced with a hyphen (-). IYYY The four-digit ISO standard year. YYY or YY or Y The last three, two, or one digits of the year. The current century is the default. IYY or IY or I The last three, two, or one digits of the ISO standard year. The current century is the default. Y,YYY The four-digit year with a comma. SYEAR or YEAR or SYear or The year spelled out. The S prefix places a negative sign in front Year of B.C. dates.Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. RR The last two digits of the year. This format is used to display years in centuries other than our own. See Section 14.3.3, RR: Changing Millenia. BC or AD The B.C. or A.D. indicator, without periods. B.C. or A.D. The B.C. or A.D. indicator, with periods. Q The quarter of the year, from 1 through 4. January through March are in the first quarter, April through June in second quarter, etc. MM The number of the month in the year, from 01 through 12. January is month number 01, September is 09, etc. RM The Roman numeral representation of the month number, from I through XII. January is I, September is IX, etc. MONTH or Month The name of the month, either in upper- or mixed-case format. MON or Mon The abbreviated name of the month, as in JAN for January. WW The week in the year, from 1 through 53. IW The week in the year, from 1 through 52 or 1 through 53, based on the ISO standard. W The week in the month, from 1 through 5. Week 1 starts on the first day of the month and ends on the seventh. DDD The day in the year, from 1 through 366. DD The day in the month, from 1 through 31.Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. D The day in the week, from 1 through 7. The day of the week that is decreed the first day is specified implicitly by the NLS_TERRITORY initialization parameter for the database instance. DAY or Day The name of the day in upper- or mixed-case format. DY The abbreviated name of the day, as in TUE for Tuesday. J The Julian day format of the date (counted as the number of days since January 1, 4712 B.C., the earliest date supported by the Oracle RDBMS). AM or PM The meridian indicator (morning or evening) ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính công nghệ thông tin tin học quản trị mạng computer networkGợi ý tài liệu liên quan:
-
52 trang 430 1 0
-
24 trang 354 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 314 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 302 0 0 -
74 trang 296 0 0
-
96 trang 293 0 0
-
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 289 0 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 281 0 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 275 0 0 -
Tài liệu dạy học môn Tin học trong chương trình đào tạo trình độ cao đẳng
348 trang 269 1 0