Cast as datetime in OQL

2
Hi, How to cast a string or a number as a datetime in OQL? I tried this: CAST(1-1-2012 AS DATETIME) But I get an error that says expected TIMESTAMP got NUMBER. This is what im trying to do: from eForm.WorkingDay as workingDays where "Year" = CAST(1-1-2012 AS DATETIME) group by "Year", Workspace, User select DATEPART(YEAR,"Year") as wYear, User as wUser, Workspace as wServiceProvider, SUM(Hours) as wHours, SUM(TotalActions) as wApplication
asked
3 answers
1

This is what I was looking for: CAST('31/DEC/2012 08:00:00 PM' AS DATETIME)

Thanks though.

answered
0

Can you use?

DATEPART(YEAR,"Year") = 2012
answered
0

No actually I would like to cast a parameter in OQL ( year an integer ) that the user chooses, into a datetime in order to compare it with a date in an entity.

answered