al4629740
asked on
error on query datetime by month
select frmRegistrationCSWText1, count(Distinct ID) from frmRegistrationCSW where entrytime = 'january' group by frmRegistrationCSWText1
I get the following error after running the above code:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
How do I specifiy entrytime correctly. datatype is datetime for that entrytime
I get the following error after running the above code:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
How do I specifiy entrytime correctly. datatype is datetime for that entrytime
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Neither option of course, takes the year into account.