473,395 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to add a week to datetimepicker default value

9
Hello everyone,

I have a windows form that has a datetimepicker control in it.

I need to set the default date of the datetimepicker control to
todays date + 1 week.

I was wondering if anyone has an example of how to do this?

thank you.

pelusa.
Jan 29 '08 #1
2 2406
RedSon
5,000 Expert 4TB
Hello everyone,

I have a windows form that has a datetimepicker control in it.

I need to set the default date of the datetimepicker control to
todays date + 1 week.

I was wondering if anyone has an example of how to do this?

thank you.

pelusa.
Can't you just set the value to what you want before it opens?
Jan 29 '08 #2
abev
22
Hello everyone,

I have a windows form that has a datetimepicker control in it.

I need to set the default date of the datetimepicker control to
todays date + 1 week.

I was wondering if anyone has an example of how to do this?

thank you.

pelusa.
Pelusa -

In the Form Load did you try this:

Me.DateTimePicker1.Value = dateadd(DateInterval.Day, 7, Date.Today)

(Where DateTimePicker1 is the name of your date picker)
Jan 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mr. B | last post by:
Is there some way I can 'easily' change the start day for a DateTimePicker other than screwing around with Region Settings (I only want this while my application is running). The default start...
3
by: Mr. B | last post by:
Is there some way I can 'easily' change the start day for a DateTimePicker other than screwing around with Region Settings (I only want this while my application is running). The default start...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
7
by: Clamara | last post by:
When adding a new record from my form, I pre-set my DateTimePicker's value to System.DateTime.Today Since the "Today" value is used most of the time, the user doesn't need to select a date from...
6
by: Kyote | last post by:
I'm using a DateTimePicker for date fields in an Access db Membership app. Some of the date fields are empty, meaning they haven't been filled out yet, or they cannot be. But when a record is read...
0
by: tschroeder250 | last post by:
Hi Everyone, There are so many Nullable DateTimePickers out there that this post may not even be found among all the others, but I wanted to try. First, I want to thank all the authors of the...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.