473,382 Members | 1,302 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,382 software developers and data experts.

its regarding datepicker and displaying 15th day date in the text box

ill give a clear explanation here...
in my project of library management..for issue date i have used date picker, it will automatically take present date..but for the due date i have kept a text box, so that the next 15days must be icremented and that date must be shown.i need code for this in c#..plz help me..
for ex..my issue date is 03-03-2011 my due date must be 13-03-2011.
Mar 3 '11 #1
3 2083
GaryTexmo
1,501 Expert 1GB
So to boil it down... a datetime picker provides a date and you need a new date that is 15 days after that?

Check out the DateTime.AddDays Method, it should be what you're looking for. You can get the currently selected date from the DateTimePicker object so once that finishes, you can get a copy of that date, add 15 days to it, and put the string value of it in your textbox.

Give it a try and let me know if you have any troubles.
Mar 3 '11 #2
hey will it change as d date changes...??
Mar 7 '11 #3
GaryTexmo
1,501 Expert 1GB
It depends on where you put the code... if I recall correctly, you have to show a DateTimePicker manually so the code would be something like...

Expand|Select|Wrap|Line Numbers
  1. if (myDateTimePicker.ShowDialog() == DialogResult.OK)
  2. {
  3.   // do some stuff here
  4. }
So if "do some stuff here" involves you setting the date in the text box, then yes. It's not an automatic thing, it's what you write the code for ;)
Mar 7 '11 #4

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

Similar topics

2
by: Paul Beckett | last post by:
I have successfully used strtotime to format the date on a webpage that is pulled form a MySQL database in the form yyyy-mm-dd. However, in another part of the webpage, I have to insert another...
8
by: paul | last post by:
Hi everyone, I've just started using php, and although I am very impressed by it, there are some things with which I am confounded! What I'm trying to do is read in a Date from a mySql database...
2
by: Paul M | last post by:
Hi there, i hope someone can help me out here.. I have a input screen where i want the user to enter text in 2 different languages, english and macedonian. How is it possible to make the...
0
by: Massy | last post by:
Hi I have created a date-range parameter in crystal and i wanted to display the value of what the user has chosen in the title of the report I have dragged the parameter onto my report but when...
1
by: libsfan01 | last post by:
HI all! ive need to format the date (variable "tomorrow") in this form to mysql format yyyy-mm-dd can anyone please show me how to amend my script? regards Marc
0
by: jonefer | last post by:
Basic Syntax: I have a formula that needs to return "N/A" or a date. So the formula returns string where I am stuck is what is the equivalent of (MS Access) Format(, "mm/dd/yyyy") because...
0
by: Splinter | last post by:
If i want to find the creation date of the database is it possible to get the information regarding this from ibdata1 file? Secondly is there any tool or reader that can read ibdata file? Help...
1
by: ravindranathreddy | last post by:
Hi, I am trying to select a value from a table which data type is time stamp and in my select query i am checking for the condition, if the retrieved value is null then i am displaying it in the...
2
by: trysenthil | last post by:
hi all., i want a query from u.,which must display me like this., is displaying me., 07-september-2007
2
by: adhoc | last post by:
hai guys.. i'm having prob regarding displaying current date using label.. i'm using this code: lblCurrTime.Text = Format$(Now, "dd mm yy") the output is: 14 32 08
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.