Calculating no of months between 2 dates
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Calculating no of months between 2 dates Expand / Collapse
Author
Message
Posted 7/28/2008 2:09:41 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/5/2008 3:44:38 PM
Posts: 9, Visits: 32
I need to find the number of months between 2 dates.. say how many months elapsed between today's date and '2008-06-06'

Can someone please help me.

Thanks in advance
Post #12315
Posted 7/28/2008 11:25:45 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 7:30:07 AM
Posts: 197, Visits: 611
Hello,

You can do that using:

SELECT CURRENT_DATE - CAST('2008-06-06' AS DATE) MONTH(4);

Regards,

Adeel
Post #12322
Posted 7/29/2008 8:53:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/5/2008 3:44:38 PM
Posts: 9, Visits: 32
thanks Adeel.. that worked.
Post #12334
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 12:01am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.094. 7 queries. Compression Disabled.