Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 8th, 2006, 04:40 AM
Authorized User
 
Join Date: Mar 2006
Location: bedlington, northumberland, United Kingdom.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default DateTime Picker

Hi, I am having a little trouble with my validation for a datetimePicker. My assignment states that the user of my application has to choose a date(so I have used the dtp object). My problem is that this date cannot be within 7 days from today's date as the user must book a week in advance...Has any one got a clue how to say :

              dateTimePicker.Value=dateTimePicker+7Days

or the other way round...I'm not sure!!! Only been programming for a few months.
Sorry if this is a simple problem..but it has me baffled!xxxxx

Reply With Quote
  #2 (permalink)  
Old March 9th, 2006, 11:22 AM
Registered User
 
Join Date: Jan 2006
Location: Crawley, Sussex, United Kingdom.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What you need is something like:-
  DateTimePicker1.Value = DateAdd(DateInterval.Day, 7, Date.Now)

Good luck
Chris

Reply With Quote
  #3 (permalink)  
Old March 9th, 2006, 01:09 PM
Authorized User
 
Join Date: Mar 2006
Location: bedlington, northumberland, United Kingdom.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Chris. This worked wonders. I knew that it would be just something simple however nothing is simple until you know!xxx

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with dateTime picker roy_mm Reporting Services 2 March 14th, 2007 11:34 AM
date picker slice2116 ASP.NET 2.0 Basics 5 August 18th, 2006 11:50 PM
Date Picker nicole yeoh Reporting Services 1 November 19th, 2005 06:56 AM
UTC DateTime to Local DateTime r_ganesh76 SQL Server 2000 1 April 4th, 2005 08:21 AM
Date Picker wspace VS.NET 2002/2003 1 December 30th, 2003 12:42 AM



All times are GMT -4. The time now is 03:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.