Hi,
I am working with windows applications
I am using MaskedEditBox(RadMaskedEditBox, telerik)
for this I am using masktype is standered and mask is 00/00/00
This date text box validated based on system date format but I want to validate date based on dd/mm/yyyy format
My code is
try
{
DateTime d=DateTime.parse(datetext);
}
catch(...)
{...}
Please can you tel me how to validate date based on dd/mm/yyyy format
Loading
raja rameshPosted Oct 5, 2011, 10:02 AM
Jean PaulPosted Oct 3, 2011, 3:06 PM
You can use:
DateTime dateTime = DateTime.ParseExact(text, "dd/mm/yyyy", null);
Regards,
JP