All Forums Database
Kishore_1 208 posts Joined 03/10
29 Apr 2014
Period data type

How can I extract the start date and end date of the values stored in  a period data type column?
I want to use this to calculate the duration for which a particular policy was valid, hence need to find the difference between start date and end date.
 
Appreciate your help.
Thanks in Advance!!

Raja_KT 1246 posts Joined 07/09
29 Apr 2014

Can you try with
SELECT your_period_data_type,BEGIN(your_period_data_type) from your_table;
SELECT * FROM  your_table WHERE BEGIN(your_period_data_type) = DATE '2014-04-30';
SELECT ......your_period_data_type,END(your_period_data_type) from your_table;

SELECT * FROM  your_table WHERE END(your_period_data_type) = DATE '2014-04-30';

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

Kishore_1 208 posts Joined 03/10
03 May 2014

Thanks Raja for the info,it really worked!

You must sign in to leave a comment.