PC Review


Reply
Thread Tools Rate Thread

date validation

 
 
suvra saha
Guest
Posts: n/a
 
      21st Oct 2009
i want to insert a date validation between jan'09 to april'09 in c#



maz77 wrote:

date validation
03-Jul-08

I am trying to develop a good validation for a date in C#; a valid dat
can be inserted in these formats
- dd/mm/yyy
- dd/mm/yyyy h24:
- mm/dd/yyy
- mm/dd/yyyy h12:
How can I proceed
Is "Datetim

Previous Posts In This Thread:

On Thursday, July 03, 2008 5:37 AM
maz77 wrote:

date validation
I am trying to develop a good validation for a date in C#; a valid dat
can be inserted in these formats
- dd/mm/yyy
- dd/mm/yyyy h24:
- mm/dd/yyy
- mm/dd/yyyy h12:
How can I proceed
Is "Datetim

On Thursday, July 03, 2008 6:43 AM
Mark Rae [MVP] wrote:

Re: date validation
Yes it is

However, you have posted your question on an ASP.NET newsgroup, so I a
assuming that you intend to use this in an ASP.NET app..

There is, generally speaking, no need to use server-side

On Thursday, July 03, 2008 10:31 AM
Andrew Morton wrote:

Re: date validation
Mark Rae [MVP] wrote

Surely you should mention the caveat about protecting against maliciou
users who might bypass the client-side validation for the purposes of SQ
injection, XSS, or just plain i

On Thursday, July 03, 2008 11:02 AM
Mark Rae [MVP] wrote:

Re: date validation
SQL Injection is fairly simply bypassed by using stored procedures and / o
parameterised queries

As for invalid dates specifically, they can be avoided completely by using
calendar control, the p

On Thursday, July 03, 2008 12:07 PM
Andrew Morton wrote:

Re: date validation
Mark Rae [MVP] wrote

I was writing about malicious users in particular, who will hav
tools/browser add-ons to alter the data en route from the browser to th
server or enter data directly into hidd

On Wednesday, July 09, 2008 11:33 PM
Munna wrote:

HiIs "Datetime.TryParse()" a good choice?
H

Is "Datetime.TryParse()" a good choice

yes it i

Best of luc

Munn

www.munna.shatkotha.com/blo
www.munna.shatkotha.co
www.shatkotha.com

EggHeadCafe - Software Developer Portal of Choice
ASP.NET: Jazz Up the Xml Control
http://www.eggheadcafe.com/tutorials...p-the-xml.aspx
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      21st Oct 2009
On Oct 21, 8:19*am, suvra saha wrote:
> i want to insert a date validation between jan'09 to april'09 in c#
>


You can try to do something like this

DateTime d1 = Convert.ToDateTime("1/9/2009");
DateTime d2 = Convert.ToDateTime("4/9/2009");

if (mydate >= d1 && mydate <= d2 )
{
// ok
}

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
click date/time field display calendar and validation of date /tim Smithskenpo Microsoft Outlook Form Programming 0 4th Mar 2010 08:20 PM
Date Validation Current Date / Past 45 Days / Null OK Jani Microsoft Access Form Coding 2 12th Mar 2009 02:39 PM
Another Date Validation question (date +1) NoviceNana Microsoft Access Form Coding 0 4th May 2007 03:05 PM
Date Validation - Must equal Sundays date =?Utf-8?B?amVyaWRib2htYW5u?= Microsoft Excel Misc 14 30th Nov 2005 08:40 PM
Date Colum Date Formatting & Validation =?Utf-8?B?TWlrZQ==?= Microsoft Excel Programming 1 7th Jun 2004 01:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:48 AM.