BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   hi please help me find number of day there in given two dates in string format (http://www.blackberryforums.com/developer-forum/223317-hi-please-help-me-find-number-day-there-given-two-dates-string-format.html)

kbramprasath 04-01-2010 04:50 AM

hi please help me find number of day there in given two dates in string format
 
find number of day there in given two dates. that mean give two dates means one is current date another one is get in string format month and date only there, calculate number of day .ex 1. 31/3/10 2. 4/4 my out put is 4 days finish that day .help code immediatly.

vivartpandey 04-01-2010 05:51 AM

i think you have to parse date manually and after that you can create date object.

Code:


// for date 31/3/10
monthnum = 3;
daynum = 31;
year = 10;
Calendar getCal = Calendar.getInstance();
            getCal.set (Calendar.MONTH,monthnum );
            getCal.set(Calendar.DAY_OF_MONTH,daynum);
            getCal.set(Calendar.YEAR,yearnum);
            Date date = getCal.getTime();


Dubdub 04-01-2010 08:29 AM

Please do not double post. This thread is closed.


All times are GMT -5. The time now is 05:18 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.