Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:56:24+00:00 2026-06-17T16:56:24+00:00

I am enhancing our existing web application that will be used on EMEA where

  • 0

I am enhancing our existing web application that will be used on EMEA where I need to change the date format from “mm/dd/yyyy” to “dd/mm/yyyy” at runtime based on the user’s global region.

My problem is that my required validation is not accepting the “dd/mm/yyyy” format.

<asp:CompareValidator ID="cvDateReportCompleted" runat="server" ErrorMessage="Report Date is not in correct format" ControlToValidate="txtDateReportCompleted" Operator="DataTypeCheck" Type="Date" ValidationGroup="vgMain" Display="None"></asp:CompareValidator>

Can anyone provide the details to deal with this problem that asp:CompareValidator will accept either “mm/dd/yyyy” or “dd/mm/yyyy”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:56:25+00:00Added an answer on June 17, 2026 at 4:56 pm

    You have to consider this before going further:

    The CompareValidator is pretty particular about the dates that it will accept. For example, the following dates are not considered valid:

    January 1, 2001
    Jan 1, 2001

    The CompareValidator requires a date that looks like this:

    1/1/2001
    1-1-2001

    http://www.informit.com/articles/article.aspx?p=25461&seqNum=5

    Solution:

    By default the ASP.Net CompareValidator does not work for dd/mm/yyyy format hence we will need to change the Culture property of the page to en-GB in the @Pagedirective of the ASP.Net Web Page as show below

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" 
    Inherits="_Default" Culture = "en-GB" %>
    

    Live demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am enhancing an existing web application and I have created a new database
I am enhancing an existing JSF app. There I need to add ExtGWT component
I am enhancing a tool. Please note that this tool will be linked to
I'm enhancing an open source control to add some functionality that I need, and
I'm a Flex rookie tasked with enhancing an existing application. One of those enhancements
I'm in the process of porting, enhancing, and D-atizing our reign SDK from C#
We are currently enhancing an ASP.NET app that performs quotes on a number of
I am enhancing a piece of software that implements a simple ASCII based protocol.
am running the asp.net application...am enhancing the already developed project..i want to create the
I'm working on enhancing logging in some node.js applications. In the past have used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.