IT's archives

How to use EXTRACT function with date and time columns
Written by admin in Tuesday, November 6th 2007
Using Extract function with any date field is easy. Let’s try this out with system date and system time commands. To see the current date we use
SELECT DATE;
This would give output as "11/06/2007". Suppose you want to EXTRACT the month from the date then use this query
SELECT EXTRACT (MONTH FROM date);
This would give "11" as the output. Similarly for YEAR and DAY use the following commands
SELECT EXTRACT (YEAR FROM date);
SELECT EXTRACT (DAY FROM date);
But for [+]More From Choose a category
Recently in Choose a category
Latest in Choose a category
Tags Cloud
Recent Comments
- admin on Arithmetic Functions and Operators in Teradata SQL.
- jampa on Arithmetic Functions and Operators in Teradata SQL.
- Rahul Kale on Transaction Management
- Ravi prakash on Usage of Macro in Teradata
- bhanwar on How To Choose A Good Online Traffic School
Archives
- March 2011 (1)
- March 2010 (1)
- December 2009 (1)
- December 2007 (1)
- November 2007 (1)
- October 2007 (16)
- September 2007 (3)
- August 2007 (21)
- July 2007 (17)
- June 2007 (15)
- May 2007 (8)
- April 2007 (4)



