Oct 15, 2007 #1 FORAND Programmer May 26, 2003 64 CA hi I have 2 sets of data : Time of entry Time of exit Both data are varchar2(17), both data are something like this : 05/10/07 08:01:49 05/10/07 08:02:58 How can I find the time elapsed between "entry" and "exit"? Thanks in advance Forand
hi I have 2 sets of data : Time of entry Time of exit Both data are varchar2(17), both data are something like this : 05/10/07 08:01:49 05/10/07 08:02:58 How can I find the time elapsed between "entry" and "exit"? Thanks in advance Forand
Oct 15, 2007 1 #2 Dagon MIS Jan 30, 2002 2,301 GB It depends what you want to measure the difference in but, assuming it's seconds, you would use: Code: select (to_date('05/10/07 08:02:58','DD/MM/YY HH24:MI:SS') - to_date('05/10/07 08:01:49', 'DD/MM/YY HH24:MI:SS')) * 86400 from dual Upvote 0 Downvote
It depends what you want to measure the difference in but, assuming it's seconds, you would use: Code: select (to_date('05/10/07 08:02:58','DD/MM/YY HH24:MI:SS') - to_date('05/10/07 08:01:49', 'DD/MM/YY HH24:MI:SS')) * 86400 from dual
Oct 16, 2007 Thread starter #3 FORAND Programmer May 26, 2003 64 CA Thanks! That is exactly what I was looking for. Star for you! Upvote 0 Downvote