This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Some date functions SQL Date Format Masks AM—AM or PM as appropriate CC—century number (if the year is 2000, the value is 21) D—day of the week in numeric format (1-7) DAY—long name for the day (e.g., 'SUNDAY') DD—day of the month (1-31) DDD—day of the year DY—short name for day (e.g., 'SUN') FM—used to suppress blanks and insignificant leading zeros HH—hour of the day in 12-hour format HH24—hour of the day in 24-hour format MI—minute within the hour MM—two-digit month format MON—short name for month (e.g., 'NOV') MONTH—long name for month (e.g., 'NOVEMBER') PM—AM or PM as appropriate RR—like 'YY', but serves as an input to function TO_DATE (see next topic) RRRR—like 'YYYY', but serves as an input to function TO_DATE (see next topic) SS—second within the minute (0 - 59) SSSSS—second of the day (number of seconds past midnight) W—week of the month in numeric format WW—week of the year in numeric format YEAR—year spelled out as a string YY—two-digit year YYYY—four-digit year...
View Full Document
- Summer '10
- 1981, 1907, 1908, 1906, emp, SELECT ename