Parse method is used to parse string into valid date and time format. I have a input variable with DateTime datatype in "03-Jan-2010" format I want to convert that in to a String type of dd/MM/yyyy format.How can this be done using C.idea of the compexity of regex and validating dates. so i would use. d4(?:/d1,2)2. Then in c do whatever to validate the match. while it can be done, youll be spending a lot of time trying to achieve it, though there is a regex in that post that with a bit of fiddling supposedly will validate dates in regex string pattern "0:yyyy-mm-dd hh:mm:ss.fff Z" string replacement "0: yyyy-mm-dd hh:mm:ss" Regex rgx new Regex(pattern) string result rgx.Replace(theInputTextFile, replacement) Is it not possible to use date formats with regular expressions. Or did I make a mistake in my code? DateTime date DateTime.Today string strDate String.Format("0:MM/dd/yyyy", date) Be careful, format like you want it, it will not convert from an actual dateTime (dd/MM/ yyyy). In the example code below, the toString function is used to format the current date in the form of "dd-MM-yyyy". The dd part means two-digit day.C regular expressions regex. Below is the regular expression for mm/dd/yyyy format. BUT the expression is giving true for mmddyyyy format also. It should return false without /. Anyone can change it to the required regex? Следующее. How to display date in dd/mm/yyyy format in java?Java Tutorial For Beginners 40 - Using Date Time formatting Date using SimpleDateFormat - Продолжительность: 10:47 ProgrammingKnowledge 82 049 просмотров. System.Text.RegularExpressions.RegexOptions.None) In the following code, ReplaceDateString will replace date string from mm/dd/yyyy format to mm-dd-yyyy.How to remove invalid characters from a string using regular expression in c. Related snippets. Check date is in dd/mm/yyyy format.PHP function for Digits Grouping in indian format. Drupal - Show the taxonomy in the format - "term(node count)" - for a given vocabulary. I want to validate this textbox such that user enters date in dd/MM/yyyy HH:MM format only. Can u pls suggest me how this can be done. pls give me regular expression for this? In this example we explain that how to validate Date format in dd/mm/yyyy in asp.net C backend code at runtime validation using Regex validator provided by .Net Framework. We all know very to validate any like Date,only number,required validation Is there any other way to convert date in dd.MM.yyyy format without changing user language?If in c you convert the datetime to a string with a specified format and convert it to a datetime with a matching style database-side nothing can go wrong. I am new in ASP.Net with c. I want date in a dd/mm/yyyy format with validation in TextBox .In that case write a simple utility (I have them for integers, decimal etc) that uses regular expressions to validate the date. I have the regular expression for "dd/MM/yyyy" which works fineasp:CalendarExtender ID"CalendarExtender1" runat"server" Format"dd/MM/ yyyy".