Build-in Data Types in SQL (Cont.) Can extract values of individual fields from date/time/timestamp Example:extract (year from r.starttime) Can cast string types to date/time/timestamp Example:cast <string-valued-expression>as date Example:cast <string-valued-expression>as time Database System Concepts,5th Edition,Oct 5.2006 4.4 Silberschatz,Korth and SudarshanDatabase System Concepts, 5th Edition, Oct 5. 2006 4.4 ©Silberschatz, Korth and Sudarshan Build-in Data Types in SQL (Cont.) Can extract values of individual fields from date/time/timestamp Example: extract (year from r.starttime) Can cast string types to date/time/timestamp Example: cast <string-valued-expression> as date Example: cast <string-valued-expression> as time