|
|
|
The versatile Date datatype in VB.NET provides a large amount of built in functionality to manipulate dates and times. The ability to add, subtract and compare date values is very useful in particular. For example, suppose you are managing hundreds of clients in an insurance company. Since insurance policies have to be renewed on a periodic basis, you need to send the client a letter just about one month in advance reminding him to renew it in time.
Now for the code: I have used the AddDays method of the Date class in the following sample code to determine whether renewal notice needs to be sent. |
Click here to copy the following block | Private Function SendRenewalNotice(ByVal ExpiryDate As Date) As Boolean
Dim ThirtyDaysLater As Date
ThirtyDaysLater = Date.Today.AddDays(30)
If ExpiryDate <= ThirtyDaysLater And ExpiryDate >= Date.Today Then Return True Else Return False End If
End Function |
|
|
|
Submitted By :
SaiKiran Jetti
(Member Since : 8/21/2004 9:16:25 AM)
|
|
|
Job Description :
I'm computer engineer. I mostly work on Oracle databases - PL/SQL and Developer 9i. I've worked for the IS dept. of a large insurance company and am now working for a software consulting firm.
I am also a freelance writer - I write technical articles about Oracle databases and database fundamentals. |
View all (8) submissions by this author
(Birth Date : 4/7/1980 ) |
|
|