Question:
How to find the difference between dates.(Year, Month, Day )?
Answer:
Year is that nos which is not changed for atleast 12 month. Month is that nos which is stable at least 30 days. And the Day is that no. which is always change with every morning. thats it. Source: CoolInterview.com
Answered by: Amol Kulkarni | Date: 8/27/2009
| Contact Amol Kulkarni
date1= d1 | m1 | y1 date2= d2 | m2 | y2
differnce :: y= y2 - y1 m= m2 - m1 d= d2 - d1 if( d < 0 ) { d = (days in m1 i.e 28 or 29 or 30 or 31) -d1 + d2; m = m -1 ; } if(m < 0) { m = 12 + m ; y = y - 1; } Source: CoolInterview.com
Answered by: brijendra kumar | Date: 10/26/2009
| Contact brijendra kumar
365(or)366 are year,1 day is a day,7 days are 1 week Source: CoolInterview.com
Answered by: u.shivarajkumar | Date: 12/7/2009
| Contact u.shivarajkumar
Do work day on(date) & collect mony end of the month then u see end of the year u also happy in our life that means (DATE/MONTH/YEAR) Source: CoolInterview.com
Answered by: Trupti c.Berde | Date: 1/21/2010
| Contact Trupti c.Berde
year is that nos which is not changed for atleast 12 month. Month is that nos which is stable at least 30 days. And the Day is that no. which is always change with every morning. thats it. Source: CoolInterview.com
Answered by: kavitha | Date: 6/27/2010
| Contact kavitha
Year is that nos which is not changed for atleast 12 month. Month is that nos which is stable at least 30 days. And the Day is that no. which is always change with every morning. thats it.
Source: CoolInterview.com
Answered by: sourabh jain | Date: 8/2/2010
| Contact sourabh jain
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|