Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sort by todays Date

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-16 : 10:08:04
Joe writes "Hello,

I'm sure there has to be someone out there who has hit this stumbling block. I'm trying to list data by todays date. I'm useing the GETDATE function but it returns no records. I know there are existing records by todays date, but i get nothing returned.

Here is my syntax, can anyone help

SELECT
Users.ID,
Users.Name,
Users.FullName,
Users.Extension,
Users.Email,
TimeClock.TimeClockID,
TimeClock.InOut,
TimeClock.TCTime,
TimeClock.TCUser,
TimeClock.TCDescription

FROM Users JOIN TimeClock on Users.Name = TimeClock.TCUser


WHERE timeclock.tctime = CURDATE()"

Nazim
A custom title

1408 Posts

Posted - 2002-04-16 : 10:12:03
Check for convert function in BOL .

where convert(varchar(10),timeclock.tctime,121) =convert(varchar(10),getdate(),121)

HTH

--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -