Wrox Programmer Forums
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 September 15th, 2004, 02:44 AM
Authorized User
 
Join Date: Sep 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default date format

Hi:

how can i fix the date format of a textbox to dd/mm/yyyy and display a message when a user eneters another format.
 
Old September 15th, 2004, 03:05 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Seperate dd,mm,yyyy and format as DD(eg.09),MM(eg.08),YYYY(eg.2004) and Check for the DD's length is 2& day is correct and MM's length is 2&less than 12.If it is not then throw the error.

 
Old October 8th, 2004, 04:36 AM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use regular expression to check the Date the user entered in the textbox and display message accordingly.



It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
 
Old October 8th, 2004, 07:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Or force the user to use already formatted data.

http://www.eworldui.net/CustomContro...PopupDemo.aspx







Similar Threads
Thread Thread Starter Forum Replies Last Post
date format differs, need to force format somehow patricolsson ASP.NET 2.0 Basics 1 December 3rd, 2009 12:53 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
Help with date format gregalb SQL Server 2000 1 February 13th, 2007 10:15 AM
How to give Date format while entering date Subuana Beginning VB 6 4 March 17th, 2006 07:25 AM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM





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