Wednesday, July 15, 2009

 

function to test date MonthYear from input string

private string TestDateMonthYear()
{
string InputString = "200819";
Regex RegexObj = new Regex("^(\\d{4})([0]?[1-9]|1[0-2])$");
return RegexObj.Replace(InputString, "$2/$1");
}
Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?