I want to convert the current date to integer value. By default, it returns long. When I try to convert long to integer, and afterwards I convert the integer value to date,
Simple really create a long variable that represents a default start date for your program Get the date to another long variable. Then deduct the long start date and convert to a integer voila To read and convert back just add rather than subtract. obviously this is dependant on how large a date range you require.