Period data type

Database
Enthusiast

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!!

Tags (1)
2 REPLIES
Enthusiast

Re: Period data type

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';

Enthusiast

Re: Period data type

Thanks Raja for the info,it really worked!