General information
Forum:
Microsoft SQL Server
Title:
Saving date and time and getting date
Hi All,
I will create a datetime field. I'll save date and time to it. I need date and time and have filtering just date part. Should I create an index like;
CONVERT(char(10),mydate,112)
and use;
vfp:
xmydate=dtoc(date(),1)
sql server:
where convert(char(10),mydate,112)=?xmydate
for performance
or is just an index with mydate is enough for performance;
vfp:
xmydate=date()
sql server:
where mydate=?xmydate
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only