aspose file tools
The moose likes JDBC and the fly likes JSP and oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "JSP and oracle" Watch "JSP and oracle" New topic
Author

JSP and oracle

Ganapathy palanisamy
Greenhorn

Joined: May 29, 2008
Posts: 22
I AM WORKING OUT WITH JSP AND ORACLE


query for calculating the time difference in hours with minutes. From these columns shift1,in_punch1,out_punch1 and shift2 ,in_punch2,out_punch2 in oracle?

(WHERE EMPCODE='7010001' AND PUNCH_DATE='01-JAN-10' ; for the whole month of employee..)

i did this query for a single shift but not for both the shift.

select ((to_date(OUT_PUNCH1,'HH24:MI:SS')-to_date(IN_PUNCH1,'HH24:MI:SS'))*24)-8 from act_stipend;

where as 24 for gives whole hours in days and 8 gives extra hours worked beyond 8 hours.

kindly do the help for me.
thank you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56554
    
  14

Please take the time to choose the correct forum for your posts. This forum is for questions on XYZ. For more information, please read this.

This post has been moved to a more appropriate forum.

Also,pPlease be sure to take the time to compose descriptive subjects for your posts; read this for more information.

A title such as "ORACLE 10G" is not helpful. What would happen if all posts had such a title?

Please go back and change your post to add a more meaningful subject by clicking the button on your post.

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5579

The new title is not much better. Think: what are you asking about? Isn't it how to write a query to do time differences? Then why not make that the title? ("Oracle query for time difference")


JBoss In Action
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JSP and oracle
 
Similar Threads
Prepared Statement and Date class - Problem still exists
Oracler Date function
Difference between two timestamp fields
Prepared Statement and Date class
Resultset based on current Date and Time