New to SQL codes. Using SQL 2005. I have a varchar field that is a date. I need to convert this to an actual date field. I was given this piece of code
dbo.fn_datetodisplaydate(dbo.fn_chartodate(DateOfReferral))
where DateOfReferral is the field name. The problem is that this code give me a 2 digit year, e.g. 03/01/10. What I need is a 4-digit year to display in the results, e.g. 03/01/2010. Can someone tell me how to do this?
Thanks..
dbo.fn_datetodisplaydate(dbo.fn_chartodate(DateOfReferral))
where DateOfReferral is the field name. The problem is that this code give me a 2 digit year, e.g. 03/01/10. What I need is a 4-digit year to display in the results, e.g. 03/01/2010. Can someone tell me how to do this?
Thanks..