DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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, 03: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, 10:25 PM
  3. Pooling in n-tier architecture
    By Jeff Pipes in forum .NET
    Replies: 11
    Last Post: 05-15-2002, 10:17 AM
  4. Thin Objects for Better Performance
    By Dave Fleischman in forum Enterprise
    Replies: 3
    Last Post: 08-18-2000, 01:10 PM
  5. Components vs Objects
    By Oliver Lennon in forum Enterprise
    Replies: 3
    Last Post: 04-18-2000, 12:30 PM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links