Solved

Convert date in textbox to datetime data type

Posted on 2007-03-29
1
403 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
Comment Utility
DateTime dt = DateTime.Parse(textbox1.text);
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now