Hi, your code will get (-)negative value for future date, (+)positive value for past date. it works ok.
Just make sure of a given date, which is in a correct 'dateFormat' in using 'dateParse' statement.
ex. "9/21/2007", this should be "09/21/2007"
__________________
Rioven
DEVICE: Motorola ATRIX (Dual Core) Android 2.2.1
DESKTOP: Intel Pentium Dual-core E5200; Microsoft® Windows® Vista Home (Basic); Hard Disk:320GB; Memory:4096MB
|