How to get the format of the date entered in the textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ways2ajay
    New Member
    • Mar 2007
    • 1

    How to get the format of the date entered in the textbox

    Hello i have problem in saving date value in the database. as i got values in the textboxes either throught the date picker which insert the date in format of "dd/MM/yyyy" . but user can also enter the date in his own format and i have to check before saving it in sql server whether it is in "MM/dd/yyyy" format or not else it gives error in sql server 2000.
    Plz anyone help me out.
  • narayan2609
    New Member
    • Mar 2007
    • 4

    #2
    Originally posted by ways2ajay
    Hello i have problem in saving date value in the database. as i got values in the textboxes either throught the date picker which insert the date in format of "dd/MM/yyyy" . but user can also enter the date in his own format and i have to check before saving it in sql server whether it is in "MM/dd/yyyy" format or not else it gives error in sql server 2000.
    Plz anyone help me out.

    u can validate it through javascript
    in that u have to create a function to check the date format and as well as leap year validation
    r u aware of javascript or not

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Here is an article that may help:
      ASP.NET FAQS

      Comment

      Working...