Try the following queries:
--first validate that we have a valid date object
select isdate('18560311')
--Lets see what it looks like in datetime format
select cast('18560311' as datetime)
--Woops, doesn't like being converted to smalldatetime
select cast('18560311' as smalldatetime)
Any idea why this date can be converted to a regular date and time, but not a small date and time?
ASP, VB, VBS, Cold Fusion, SQL, DTS, T-SQL, PL-SQL, IBM-MQ, Crystal Reports, Crystal Enterprise
--first validate that we have a valid date object
select isdate('18560311')
--Lets see what it looks like in datetime format
select cast('18560311' as datetime)
--Woops, doesn't like being converted to smalldatetime
select cast('18560311' as smalldatetime)
Any idea why this date can be converted to a regular date and time, but not a small date and time?
ASP, VB, VBS, Cold Fusion, SQL, DTS, T-SQL, PL-SQL, IBM-MQ, Crystal Reports, Crystal Enterprise