I want to see the source for expiration date in vb.

Asked By 20 points N/A Posted on -
qa-featured


Hello,


I want to see the source for expiration date in vb. I am having a hard time on making some coding technique on how to set an expiration date for a specific product in my visual basic department store system. I need some tutorial that will really help me a lot.


Waiting for your support, thank you.

SHARE
Answered By 0 points N/A #179030

I want to see the source for expiration date in vb.

qa-featured

 

 

Hi Chole,

Before setting the expiration date of any product you need to  two entries:

1)Product Registration date/Manufacturing date

2)No. of days the product will be valid.

Then you can calculate  the expiration date of the product using the below code:

 

Private Sub CommandButton1_Click()

Dim Expdate as Date

Product_regdate=’18/12/2011’

Expdate=DateAdd(“d”,noofdays,product_regdate)

End Sub

 

Now store Expdate as expiration date in database.

You can also display message box whenever an item is expired by comparing the expiration date against the current date.

Hope this will help you.

 

 

Related Questions