I have an application that I need to determine if it is a new month, and if it is, it will automatically reset a 4 digit number to 0000.
Example: It is 11/17/2014, the 4 digit number is 1234. On 12/1/2014 I need to the 4 digit number to be 0000.
I have been trying to write the code for it and I can not come up with a solution. This is what I have come up with do far:
If Now.AddDays((Now.Day - 1) * -1).AddMonths(1).AddDays(-1) >= DateTime.Now Then
casenumber = "0000"
This does not work. Any help on this would be greatly appreciated!!
Thanks in advance!