Can someone help me, I want to display and see those expiry date from date today in data grid view.
If 2 months before expiry, display in yellow background
If 1 month before expiry, display in red background
in a cell which has expiry date in column of my table.
I use MSACCESS as database.
What I have tried:
Dim str As String = "SELECT * FROM TblDocuments WHERE ExpiryDate = (DateAdd(month,-1,getdate())"
Dim DaAp1 As New SqlDataAdapter(str, con)
Dim Dset1 As New DataTable
DaAp1.Fill(Dset1)
DGV1.DataSource = Dset