Solved

Convert date in textbox to datetime data type

Posted on 2007-03-29
1
413 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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 keystrokes in Netbeans IDE 8.0 for Windows.

685 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