Hello,
I don't find the ANSI SQL CONVERT function defined in any MS SQL dialect.
I'm trying to create the folowing statement using ICriteria:
SELECT CONVERT(datetime,
Str(Year (TIME)) + '-' +
Str(Month(TIME)) + '-' +
Str(Day (TIME)) +
' 00:00:00', 120) AS StartTime
FROM ...
I know a can use the CAST function which is registered in MSSql2000 Dialect but in my case it is not enough as CAST do not supply a 'style' argument as CONVERT does.
Please give me a solution to this. I saw that in Hibernate there is a 'org.hibernate.dialect.function.ConvertFunction' as well as a 'org.hibernate.dialect.function.CastFunction'. But in NHibernate 2.0 we have only 'NHibernate.Dialect.Function.CastFunction' and no ConvertFunction. The same situation is in NHibernate 2.1.
Why is it missing? Can I use some workarounds to get the same result?
Thanks,
Bogdan
|