Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2008, 05:30 AM
Registered User
 
Join Date: Mar 2008
Location: Suva, , Fiji.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert string to Date

How can I convert string in textbox to Date the capture format is 03032008 and date formatted to 03/03/2008. Can someone help? Thank you

 
Old March 19th, 2008, 07:07 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Have you tried:

DateTime dt = Convert.ToDate(txtBox1.Text);

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========




Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert string to date tgopal Javascript 2 March 18th, 2008 03:33 AM
convert string to date collie SQL Server 2000 4 March 15th, 2007 03:50 PM
convert string to date deeptibg SQL Server DTS 1 December 22nd, 2005 08:47 PM
Convert Part of String to Date twsinc Access VBA 6 October 20th, 2004 03:31 PM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.