Extract Date, projections

Hi
  How to extract date part, like
  ...
  .Where(Linq.Eq(TProjections.Year('IssueDate'), 2013))
  .Where(Linq['IssueDate'].Year = 2013)
  ...
  but for dates.
thanks


I don't understand your question. What is "date part"? The "IssueDate" property is supposed to be of type TDateTime, so its value is already a "date". The Year (and Month and Day) functions are exactly used to extract parts of that date.

Ok, thanks

Hi, Wagner
   Sorry,.... reopen this issue
   Supose you have Table1.Field1 (Timestamp/TDateTime), supose you need something like :
    select....
    from table1 a
    where CAST(a.Field1 AS TIME) between 'time1' and 'time2'
 
   try using: Linq['a.Field1'].Hour, Linq['a.Field1'].Minute, Linq['a.Field1'].Seconds its very tricky
   same to: CAST(a.Field1 AS DATE)

   Something like: Linq['a.Field1'].Date, Linq['a.Field1'].Time, would be appreciated
  
   Thanks
  

Can't you just use SQL expression or projection?


Linq.Sql('CAST({field1} as TIME) between ''time1''and ''time2'')
or 
Linq.Gt(TProjections.Sql<TDateTime>('CAST({field1} as TIME)'), TimeValue)

yes, i can
but, '...The SQL you provide in this expression must conform
with the underlying database syntax. Aurelius doesn't perform any syntax
conversion...' pag.155
as soon as possible we will use different databases
For now it's just fine,
Thanks