Convert DateTime into MM/DD/YYYY format???

Hi

I have this gridview and using this filterexpresson thing.
So I pass the where statement to gridview and I am trying to compare date field.
I am trying to look for past dated items.



Find 60 days past due from today:
Select * from orders where [expiratiodate] < getdate()-60;
This works find in SQL but doesn't work with the C# gridview.
HOw can fix this so it will work?
Gridview.FilterExpresson = "[expirationdate] < GetDate() - 60"
[expirationdate] field is Smalll Date field in sql.
dkim18Asked:
Who is Participating?
 
CoyotesITConnect With a Mentor Commented:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21625464.html

DateTime.Now.Subtract(new TimeSpan(60,0,0,0));

Will that work?
0
 
prairiedogConnect With a Mentor Commented:
What is the current format for expirationdate?
0
 
dkim18Author Commented:
I put '' and it worked out ok.
0
All Courses

From novice to tech pro — start learning today.