|
-
Aug 1st, 2004, 09:54 AM
#1
Thread Starter
Junior Member
Geting the correct Date
Hi,
What is the correct syntax to add up the date??
Example: Calculate the DueDate
Transaction Date : 14/8/2004
Days taken : 3 days
DueDate : ??
Please Help!!
Thanks,
Viv
-
Aug 1st, 2004, 10:55 AM
#2
Frenzied Member
If you need to add days, you can do something like
VB Code:
Dim today As Date = Now
today = today.AddDays(3)
MessageBox.Show(today)
-
Aug 3rd, 2004, 11:58 AM
#3
Thread Starter
Junior Member
Hi,
I still can not get the DueDate, My DueDate should be TransDate(Date) + RentalPeriod(number of days).
Heres part of my coding, i retrieved the TransDate and RentalPeriod from the SQL server. Then, i want to calculate the DueDate from TransDate + rentalPeriod. Then, i would like this calculated DueDate to display in the grid.
How can i do that???
Please help!!1
cm.Connection = OleDbConnection1
cm.CommandText = "Select VideoTitle, RentalPeriod, TransDate from TransDetails JOIN Transactions ON Transactions.TransNo = TransDetails.TransNo WHERE CustNo ='" & txtCustNo.Text & "'"
[??I need to get the DueDate by TransDate + RentalPeriod???
??how to display this Duedate in the grid along with other data???]
OleDbDataAdapter2.SelectCommand = cm
OleDbDataAdapter2.Fill(objDsTesting, "VideoTitle")
cm1 = Me.BindingContext(objDsTesting, "VideoTitle")
' txtCustNo.Text = ds.Tables("temp").Rows(cm1.Position)(0)
grdTransDetails.SetDataBinding(objDsTesting, "VideoTitle")
Thanks
viv
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|