the easiest way to add/substract java.sql.timestamp objects


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: the easiest way to add/substract java.sql.timestamp objects

  1. #1
    Join Date
    Aug 2005
    Posts
    8

    the easiest way to add/substract java.sql.timestamp objects

    hi
    is there a way to find out how many day/mins etc two different timestamp objects differ? e.g. today's date and tommorow's, or finding out tommorow's date based on current date?
    thx

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    You can to use a Date oblect to convert the timestamp to milliseconds.
    You could the calculate date difference by substracting milliseconds and converting
    back to yrs.mths.days:hrs:min:sec:ms
    For finding next date just add the number of milliseconds for 24 hrs.
    eschew obfuscation

Similar Threads

  1. Bug with Creation of Objects in SQL *Plus Worksheet
    By Michael Cole in forum Database
    Replies: 2
    Last Post: 04-02-2003, 04:06 PM
  2. Bug with Creation of Objects in SQL *Plus Worksheet
    By Michael Cole in forum oracle.general
    Replies: 0
    Last Post: 02-20-2003, 11:25 PM
  3. Pooling in n-tier architecture
    By Jeff Pipes in forum .NET
    Replies: 11
    Last Post: 05-15-2002, 11:17 AM
  4. Thin Objects for Better Performance
    By Dave Fleischman in forum Enterprise
    Replies: 3
    Last Post: 08-18-2000, 02:10 PM
  5. Components vs Objects
    By Oliver Lennon in forum Enterprise
    Replies: 3
    Last Post: 04-18-2000, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center