calculating the amount of days between 2 dates...

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

Hi All

I have an application that has a start date and a finish date I need to
calculate the number of days from the start date to the end date and then
display this in a read only text box... How might I code this?...

Regards

Scott
 
Scott said:
I have an application that has a start date and a finish date I need to
calculate the number of days from the start date to the end date and then
display this in a read only text box... How might I code this?...

\\\
Dim d1 As Date = #12/22/1999#
Dim d2 As Date = Now()
Me.TextBox1.Text = CStr(d2.Subtract(d1).Days)
///

Alternatively you can use 'DateDiff' to calculate the difference between two
dates.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top