Thread: Date comparison
View Single Post
  (#3 (permalink)) Old
jeet.bhatt@spec-india.com Offline
Knows Where the Search Button Is
 
jeet.bhatt@spec-india.com's Avatar
 
Posts: 25
Join Date: Aug 2008
Location: India
Model: 8100
PIN: N/A
Carrier: Vodafone - India
Smile Solution !! - 09-02-2008, 08:18 AM

Hi all

here is the logic of comparing dates...regarding expiry date issue


Date values stored as long values.
Every long date representation is qty of milliseconds passed from 01 jan 1970 00:00.
To compare two dates just compare two long values.

When your application starts for the first time (when there is no saved expiration date) - calculate and save expiration date in persistent store.

One day length in milliseconds is represented via constant in DateTimeUtilities class. Or you may calculate it by yourselft.

this hint is provided by rafo...

thnx rafo...thnx simon also..


Jeet
ORG::SPEC India
Ahmedabad. India

Last edited by jeet.bhatt@spec-india.com : 09-02-2008 at 08:21 AM.
   
Reply With Quote