Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2007, 12:05 AM
Authorized User
 
Join Date: Dec 2006
Posts: 43
Thanks: 4
Thanked 0 Times in 0 Posts
Send a message via MSN to Yasho
Default substracting dates in vb.net

using vb.net2003

have 2 textboxes where user inputs the date and when btnCaluculate is clicked third textbox displays the difference of days between those 2 dates.

Yasho

yvk
__________________
yvk
 
Old May 23rd, 2007, 12:37 AM
Authorized User
 
Join Date: Dec 2006
Posts: 43
Thanks: 4
Thanked 0 Times in 0 Posts
Send a message via MSN to Yasho
Default

I have solved the problem here is the solution
        Dim D1 As Date
        Dim D2 As Date
        Dim diff As Integer
        D1 = txtdate1.Text
        D2 = txtdate2.Text
        txtDiff.Text = DateAndTime.DateDiff(DateInterval.Day, D1, D2)



yvk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding asp.net calendar dates to sql database centaury ASP.NET 3.5 Basics 0 October 22nd, 2008 02:07 AM
vb.net 2008 re: VB.NET databases book bigbearjeff VB.NET 0 June 2nd, 2008 01:22 PM
How to handle dates in VB.net Yasho VB.NET 2002/2003 Basics 3 May 16th, 2007 02:41 PM
Limit Selection of Dates from Calendaer in asp.net marvz ASP.NET 2.0 Basics 0 July 21st, 2005 04:29 AM
Difference between two dates in Vb.net bimal VS.NET 2002/2003 5 August 15th, 2004 11:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.