Sorry, I'm correcting my answer. You should read:<b><br>DECODE(sign(TO_NUMBER(TO_CHAR(TheDateField,'MI'))-30),1,'To','Past')</b>. So, you can get 'To' value for minutes in 31..59, 'Past value for minutes in 0..30. If you want other partition, you can alter the DECODE statement like <b>DECODE(sign(TO_NUMBER(TO_CHAR(TheDateField,'MI'))-30),1,'To',-1,'Past','Half')</b> <p>Eduard Stoleru<br><a href=mailto:e_stoleru@yahoo.com>e_stoleru@yahoo.com</a><br><a href= > </a><br>