?
Solved

Easy question but need urgent help!

Posted on 2003-03-27
4
Medium Priority
?
122 Views
Last Modified: 2010-05-01
I am taking a class in ASP.NET.  I need to work with dates and text id fields.  I need to be able to enter a date in one text id box and a number in the other and then use the number to add days to the input date.  I cannot figure how to do this with dateadd or anything else!  Help in specific on this and I really need a good primer on using ASP.NET that does not expect you to have programmed for 10 years before you picked this application up.  Recommended reading PLEASE!
0
Comment
Question by:bergm57
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 39

Accepted Solution

by:
appari earned 2000 total points
ID: 8221019
use dateadd function

eg:
DateAdd(DateInterval.Day, 2, Now)

I think MSDN is the best choice to learn.
0
 
LVL 14

Expert Comment

by:aelatik
ID: 8221039
Convert to long ...

Dim a
a = CLng(CDate("12/10/1975"))
MsgBox a
0
 
LVL 11

Expert Comment

by:supunr
ID: 8221515
On Error resume next
NewDate = dateadd("d", val(txtNoDays.Text), CDate(txtInputDate.text))
if (Err.Number <> 0) then
   msgbox "Invalid date!"
   txtInputDate.setfocus
   exit sub
end if

' this code is for VB.  VB.Net code should be similar.
' Good Luck!
0
 

Author Comment

by:bergm57
ID: 8225432
appari
Thanks!  That bit of code got me going again.  You are an ASP.NET guru!

The other code offered worked as well but not as efficient is all.  Thanks for your comments!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question