This topic is locked

Where Date

12/10/2008 8:47:13 AM
ASPRunnerPro General questions
E
erdinoxyz author

Hi.

How find record of today?.

How is send, TODAY (10.12.2008) value to bottom link?
stSQL="SELECT ToDate, Count(ToDate) AS [Count]FROM evevents WHERE = TODAY

GROUP BY ToDate order by ToDate DESC;"

ngomong 12/10/2008

If you're using SQL Server, you can use the DATEDIFF() and GETDATE() functions.

SELECT [ToDate],

COUNT(ToDate) AS [Count]

FROM evevents

WHERE DATEDIFF(dd,[todate], GETDATE()) = 0

GROUP BY ToDate

ORDER BY ToDate DESC
E
erdinoxyz author 12/10/2008

Thanks

I solve this problem.

This code bottom. It very good work.

stSQL="SELECT ToDate, Count(ToDate) AS [Count]FROM evevents WHERE ToDate LIKE '%" & FormatDatetime(now(), 2) & "%' GROUP BY ToDate order by ToDate DESC;"
(solve = LIKE command)