Question

I'm using visual studios ASP.net with C# and I'm having trouble doing theses conversions. To convert...

I'm using visual studios ASP.net with C# and I'm having trouble doing theses conversions.

  • To convert a text date to a DateTime object, use the Convert.ToDateTime method.
  • To get the number of nights, you can subtract the departure date from the arrival date and then use the Days property of the resulting TimeSpan object.
  • To convert a selection in the drop-down list for the number of people to an integer, use the Convert.ToInt32 method.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1>>

So there is a method to input the string so as to convert it using Convert.ToDateTime. Any other format will not be accepted, also wrong information will not be accepted.

Output -->

2>>

Output

3>>

(If you like the answer, or the explanation, kindly press the 'LIKE' button)

Add a comment
Know the answer?
Add Answer to:
I'm using visual studios ASP.net with C# and I'm having trouble doing theses conversions. To convert...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT