Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11349

Re: How can I use Operand (+ , - ) with Time

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How can I use Operand (+ , - ) with Time
Date 2012-01-15 08:35 -0800
Organization Canadian Mind Products
Message-ID <htv5h71nv7jpom3b3gga51vnb6uuadjhqt@4ax.com> (permalink)
References <34afdd1f-4549-48a9-878c-8678993e97ed@t30g2000vbx.googlegroups.com>

Show all headers | View raw


On Sat, 14 Jan 2012 23:44:33 -0800 (PST), sahm <sahm007@gmail.com>
wrote, quoted or indirectly quoted someone who said :

>
>I'm Try to do program to calculate the Over Time, I'm working with 24
>hour not A.M. & P.M. and this is my Time format (HH:MM:SS) (00:00:00).
>But how can I use operand (+, -) with Time
>This is my Code

You need to do your calculations in milliseconds since 1970. Then you
can simply subtract to find intervals.

Then your questions becomes how to I convert local time to and from
internal format. 

See http://mindprod.com/jgloss/calendar.html
http://mindprod.com/jgloss/date.html
http://mindprod.com/jgloss/time.html
http://mindprod.com/jgloss/timezone.html

-- 
Roedy Green Canadian Mind Products
http://mindprod.com
One of the most useful comments you can put in a program is 
"If you change this, remember to change ?XXX? too".
 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How can I use Operand (+ , - )  with Time sahm <sahm007@gmail.com> - 2012-01-14 23:44 -0800
  Re: How can I use Operand (+ , - )  with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 08:32 -0500
    Re: How can I use Operand (+ , - )  with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 08:52 -0500
    Re: How can I use Operand (+ , - )  with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 10:19 -0500
      Re: How can I use Operand (+ , - ) with Time sahm <sahm007@gmail.com> - 2012-01-15 07:55 -0800
        Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 10:50 -0800
  Re: How can I use Operand (+ , - )  with Time Roedy Green <see_website@mindprod.com.invalid> - 2012-01-15 08:35 -0800
  Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 10:31 -0800
    Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 10:51 -0800
    Re: How can I use Operand (+ , - ) with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 14:45 -0500
      Re: How can I use Operand (+ , - ) with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 15:53 -0500
      Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 15:36 -0800
    Re: How can I use Operand (+ , - ) with Time glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-01-15 20:07 +0000
      Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 15:39 -0800

csiph-web