Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Problem with TO_DATE(TO_CHAR(sysdate,'hh24:mi:ss'),'hh24:mi:ss')

Problem with TO_DATE(TO_CHAR(sysdate,'hh24:mi:ss'),'hh24:mi:ss')

From: Pankaj <pg_gupta78_at_rediffmail.com>
Date: 12 Jan 2007 00:53:16 -0800
Message-ID: <1168591995.920686.95010@q2g2000cwa.googlegroups.com>


Hi There,

I am developing a procedure that require to increase the counter by 1 if any is inserted into
a table after 1 PM. For this i create a column cutoff in a temp table and wrote a condition
like this
IF ( (TO_DATE(TO_CHAR(CutOff,'hh24:mi:ss'),'hh24:mi:ss')

		 			< TO_DATE(TO_CHAR(Sysdate,'hh24:mi:ss'),'hh24:mi:ss') )
	   )
	THEN
		tTransactionDate := tTransactionDate + 1;
	End If ;

The cutoff is a date field maintained as '01/03/2006 1:00:00 PM'.

This condition was working fine...but yesterday one user did a transaction ar exactly 12 midnight,
ans system didn't increate the counter.
Can you tell me why system didn't increase the txn Or suggest some better solution?

Thanks,
Pan Received on Fri Jan 12 2007 - 02:53:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US