In database records as follows
MedicalEntryDate
1st Oct 2014
I want to validate MedicalEntryDate should be greater than the Today's Date.
for that how can i do in asp.net using c#.
MedicalEntryDate
1st Oct 2014
I want to validate MedicalEntryDate should be greater than the Today's Date.
for that how can i do in asp.net using c#.

Wim SturkenboomRank #2,527 · 554 reputationPosted Oct 7, 2014, 2:16 AM EDT
dtNow = new DateTime(dtNow.Year, dtNow.Month, dtNow.Day);
if(MedicalEntryDate >= dtNow.AddDays(1))
{
}
else
{
}
The first two lines calculate the current date. The if statement compares the MedicalEntryDate with tomorrows date (dtNow plus one day).
Not tested, just from the head.
Abhishek KumarRank #510 · 4.8K reputationPosted Oct 7, 2014, 2:34 AM EDT
if(convert(datetime,REPLACE ('1st oct 2014', 'st', ''),101)>convert(datetime,CONVERT(VARCHAR, GETDATE(), 101),101))
BEGIN
END
Print 1
ELSE
BEGIN
print 2
END
i have used the your value for example .
you can replace it with your column.
Let me knowif you need more on this.
Abhishek