Hello all
I am new to vb.net but i have been writing my first Application.
The application is a customer database. I have a contacts form and in one of the fields the user puter their date of birth. Alk data is writen to a SQL database.
I also have a listview on the right when the application lauches.
I want this listview to show birthdays that are coming up in say the next 30days.
This is so the user can send a card/ presant.
here is my SQL Update
"update Contacts set contactname='" & tbName.Text & "', PostalAddress='" & tbAddress.Text & "', PhoneNumber='" & tbPhone.Text & "',MobileNumber='" & tbMobile.Text & "', Email='" & tbEmail.Text & "',DateOfBirth='" & Format(dtpDOB.Value, "dd MMM yyyy") & "' where contactID ='" & localContactID & "'"
Then my listview has the select
"SELECT ContactName, DateOFBirth, ContactID FROM Contacts"
I did try
Dim todaysdate As DateTime
todaysdate = Date.Now.AddDays(+30).ToString("dd MMM yyyy")
But it is looking at the YYYY and for it to show evey year the YYYY has to be ignored.
I hope this makes sence can anyone help me please
Thanks
Alan
I am new to vb.net but i have been writing my first Application.
The application is a customer database. I have a contacts form and in one of the fields the user puter their date of birth. Alk data is writen to a SQL database.
I also have a listview on the right when the application lauches.
I want this listview to show birthdays that are coming up in say the next 30days.
This is so the user can send a card/ presant.
here is my SQL Update
"update Contacts set contactname='" & tbName.Text & "', PostalAddress='" & tbAddress.Text & "', PhoneNumber='" & tbPhone.Text & "',MobileNumber='" & tbMobile.Text & "', Email='" & tbEmail.Text & "',DateOfBirth='" & Format(dtpDOB.Value, "dd MMM yyyy") & "' where contactID ='" & localContactID & "'"
Then my listview has the select
"SELECT ContactName, DateOFBirth, ContactID FROM Contacts"
I did try
Dim todaysdate As DateTime
todaysdate = Date.Now.AddDays(+30).ToString("dd MMM yyyy")
But it is looking at the YYYY and for it to show evey year the YYYY has to be ignored.
I hope this makes sence can anyone help me please
Thanks
Alan