Solved

Convert date in textbox to datetime data type

Posted on 2007-03-29
1
407 Views
Last Modified: 2013-11-07
Hi
If a user types a date into a textbox, how do you convert it so that it is a date?  I am getting cannot convert from string to datetime.  I know its being treated as a string as I am saying

            textbox1.text  

0
Comment
Question by:mugsey
1 Comment
 
LVL 10

Accepted Solution

by:
ksaul earned 500 total points
ID: 18818450
DateTime dt = DateTime.Parse(textbox1.text);
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

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