Link to home
Start Free TrialLog in
Avatar of LAppling7775
LAppling7775

asked on

SQL Cstr conversion

This is msAccess SQL that i am trying to parse in Query Analyzer -  i am getting an error on CStr.  Can someone tell me what I need to change to to use in SQL?

CDate("01/01/" & CStr(Year([entyear])-1)
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

select CONVERT (datetime ,'01/01/'+ CAST(Year(EntYear-1) as Varchar(4)) ,103) --dd/mm/yyyy
select CONVERT (datetime ,'01/01/'+ CAST(Year(EntYear-1) as Varchar(4)) ,101) --mm/dd/yyyy
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial