• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP and Oracle

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Expert
I have daily_time table.
It has emp_id,Time_in ,Time_out,datex........
For each employee there will be Time_in ,Time_out .Some times Employee will be in Shift
Like Firstday evening 5 P.M he will be coming and next day morning he will be checking out.
My Example will be down here.

Empno Time_in Time_out Diff
1 18/AUG/2009 08:05:07 AM 18/AUG/2009 05:05:00 PM
IF THE EMPLOYEE IS IN SHIFT THEN
Empno Time_in Time_out Diff
1 17/AUG/2009 08:05:07 PM 18/AUG/2009 05:05:00 AM

Please help me to find diff between time_out - time_in
Diff should be in this format : HH:MM:SS
 
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do it on Java side or Database side.

On Java side, do you know Calendar API and Database side there is some function to format into required format.

What problem are you facing? What did you try? Errors?
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use compareTo from the Date class in java.
 
reply
    Bookmark Topic Watch Topic
  • New Topic