Specifying date and time format masks

How To... 4-77 else varcomm := :comm; end if; if :sal 2 + varcomm 4000 and :job = MANAGER then srw.set_background_fill_colorred; end if; return TRUE; end; See also Section 2.1.6, About conditional formatting Section 4.9.1.5, Applying conditional formatting to a layout object

4.9.6.9 Alternating row colors

To alternate the colors of either the text or the fill of a row: ■ See Chapter 45, Building a Report with an XML Pluggable Data Source . This chapter provides detailed steps for using PLSQL procedures and format triggers to apply alternating row colors.

4.9.7 Format Masks

This section provides procedures for the following tasks that you may perform as you work with format masks: ■ Specifying date and time format masks ■ Specifying number format masks ■ Applying a format mask to a numeric object ■ Applying a format mask to a date object ■ Adding a custom format mask ■ Changing the format mask for multiple fields

4.9.7.1 Specifying date and time format masks

The following tables describe the date and time format masks, and the suffixes you can add to date format masks: Table 4–2 Date and time format masks Format Mask Description SCC or CC Century, abbreviated; S prefixes BC with - SYYYY or YYYY Year; S prefixes BC date with a - I or IY or IYY Last 1, 2, or 3 digits of year Y or YY or YYY Last 1, 2, or 3 digits of year Y,YYY Year with comma SYEAR or YEAR Year, spelled out; S prefixes BC date with - RRRR or SRRRR Year; S prefixes BC date with a - RR Last 2 digits of year BC, AD, or B.C., A.D. Century indicator 4-78 Oracle Reports Users Guide to Building Reports The following suffixes may be added to the format masks: Examples Q Quarter of year Jan-Mar= Quarter 1 MM Month in digits Jan = 01 MONTH or MON Name of month, or 3-letter abbreviation WW, IW Week in year W Week in Julian days J Julian day; the number of days since January 1,4712 BC DDD, DD, or D Day in year, month, or week DAY Day of week fully spelled out for example, MONDAY DY Name of day, 3-letter abbreviation for example, MON AM, PM, or A.M., P.M. Meridian indicator HH or HH12 Hour of day 1-12 HH24 Hour of day 0-23 MI Minute SS; SSSSS Second in minute; seconds in day FM Toggles fill mode which replaces multiple spaces before or between dates, numbers, or words with a single space Table 4–3 Date format mask suffixes Suffix Description TH Suffixed number DDth for 4th SP Spelled out number DDSP for FOUR SPTH or THSP Spelled and suffixed number DDSPTH for FOURTH Table 4–4 Date format mask examples Sample Date Format Date Displayed MMDDRR 030409 DD MON RRRR 04 MAR 2009 Mon. DD, RRRR Mar. 4, 2009 Day Month DD fmHH:MI AM Monday March 4 11:35 AM Dy Mon ddth fmHH24:MI:SS Mon Mar 4th 23:35:22 Day the ddthsp of Month Monday the fourth of March Table 4–2 Cont. Date and time format masks Format Mask Description How To... 4-79

4.9.7.2 Specifying number format masks