| Author: Rajaraman 12 May 2007 | Member Level: Diamond Points : 0 |
Check this.. It's not working properly.
|
| Author: V i Re N dRa Ku Mar K Oh Li 12 Jun 2007 | Member Level: Silver Points : 0 |
This Code is Not working....
|
| Author: Pendyala 28 Apr 2008 | Member Level: Gold Points : 2 |
This code wil not work...here u hace declared remain...but did not assigned to anything..that is the problem...
|
| Author: andy robarts 28 Apr 2008 | Member Level: Gold Points : 2 |
DateTime userDate = DateTime.Parse("03/23/2007"); int remain=0; int noOfWeek=0; noOfWeek = Math.DivRem(userDate.Day, 7, out remain); if (remain > 0) noOfWeek+=1; MessageBox.Show(noOfWeek.ToString());
|
| Author: Balamurali Balaji 03 May 2008 | Member Level: Diamond Points : 2 |
Hello andy, pendyala, vkumar, rajaraman,
Just now today only, I have seen that you all have posted feedback to this code tip.
The code was working correctly in vs2005 with date format (mm/dd/yyyy). When I ran it vs2008, it gave me error in the first line. The correct date format is (dd/mm/yyyy) in vs 2008. Otherwise, I dont see any error in it. The output is 4.
Kindly bear with the delay in clarifying this.
Goodluck.
|