date format check

  • Thread starter Ricardo Silveira
  • Start date
R

Ricardo Silveira

I'm validating a text box using a Compare Validator Component with the
folowing properties:
Operator = DataTypeCheck
Type= Date

But the web application is validating an english format date (mm/dd/yyyy)
and I need to validate in a portuguese format (dd/mm/yyyy).

Any sugestion how to change the date format check?

Thanks

Ricardo.
 
M

Martin Marinov

before validating the inputed data set the culture info for the current
thread to be your
Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("pt")

Regards
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Compare Validator and date format 0
Date format 3
Need help with this script 4
Help on Date format ??? 2
Network Service date format problem - British vs US 5
Date Validation 12
DATE Format 2
Format date 2

Members online

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,323
Latest member
XOBJamel3

Latest Threads

Top