1_,
    inputfile1_.process_cat_code as process3_3_1_
FROM input_file_log this_
    left outer join go_nogo gonogo3_ on this_.input_file_token=gonogo3_.input_file_token
    inner join input_file inputfile1_ on this_.input_file_name=inputfile1_.input_file_name
WHERE this_.file_creation_date > :p0 and
    this_.file_creation_time > :p1 and
    inputfile1_.input_file_name = :p2
ORDER BY this_.input_file_token desc;
:p0 = '20100401',
:p1 = '15:15:27',
:p2 = 'LMCONV_JR'

The query is exactly what i would expect, actually, except it doesn't actually give me what i want (all the rows in the last 2 weeks) because in the DB it's doing a greater than comparison using CHARs instead of DATEs.  I have no idea how to get the query to convert the CHAR values into a DATE in the query without doing a CreateSQLQuery(), which I would like to avoid.  Anyone know how to do this?
UPDATE:
I've been looking into trying to use Projections.SqlFunction() or formulas to accomplish this, but to no avail so far.  Here's the code i have using SqlFunction(), but i get an NHibernate.QueryException : property does not map to a single column: FileCreationDateTime error:
DateTime twoWeeksAgo = DateTime.Now.AddDays(-14);
ICriteria criteria =
    Session.CreateCriteria<InputFileLog>()
   .Add(Restrictions.Gt(Projections.SqlFunction("to_date", NHibernateUtil.DateTime, Projections.Property(MembersOf<InputFileLog>.GetName(x => x.FileCreationDateTime))), twoWeeksAgo))
    //.Add(Expression.Gt(MembersOf<InputFileLog>.GetName(x => x.FileCreationDateTime), DateTime.Now.AddDays(-14)))
   .AddOrder(Order.Desc(Projections.Id()))
    .CreateCriteria(typeof(InputFile).Name)
       .Add(Expression.Eq(MembersOf<InputFile
1 _, 
     inputfile1_.process_cat_code as process3_3_1 _ 
 FROM input_file_log this _ 
     left outer join go_nogo gonogo3 _ on this_.input_file_token = gonogo3_.input_file_token 
     inner articulation input_file inputfile1 _ on this_.input_file_name = inputfile1_.input_file_name 
 WHERE this_.file_creation_date >: p0 and 
     this_.file_creation_time >: p1 and 
     inputfile1_.input_file_name =: p2 
 decree BY this_.input_file_token desc; 
: p0 =' 20100401', 
: p1 =' 15:15:27', 
: p2 =' LMCONV_JR' 

 The query is exactly what i would expect, actually, except it doesn't actually hold me what i want (all the rows in the concluding 2 weeks) because in the DB it's doing a great than comparison using CHARs rather of DATEs.   I have no estimate how to beget the query to convert the CHAR values into a DATE in the query without doing a CreateSQLQuery (), which I would wish to avoid.   Anyone know how to do this? 
 UPDATE: 
 I've been look into trying to use projection. SqlFunction () or formula to accomplish this, but to no avail indeed far.   Here's the code i have using SqlFunction (), but i get an NHibernate. QueryException: property does not map to a individual column: FileCreationDateTime error: 
 DateTime twoWeeksAgo = DateTime. Now. AddDays(-14); 
 ICriteria criteria = 
     Session. CreateCriteria < InputFileLog > () 
    .Add(Restrictions. Gt(Projections. SqlFunction("to_date ", NHibernateUtil. DateTime, Projections. Property(MembersOf < InputFileLog>.GetName(x = > x. FileCreationDateTime) )), twoWeeksAgo) ) 
     //.Add(Expression. Gt(MembersOf < InputFileLog>.GetName(x = > x. FileCreationDateTime), DateTime. Now. AddDays(-14) )) 
    .AddOrder(Order. Desc(Projections. Id ()) ) 
     .CreateCriteria(typeof(InputFile).Name) 
        .Add(Expression. Eq(MembersOf < InputFile
1_,
    inputfile1_.process_cat_code as process3_3_1_
FROM input_fmle_log fhis_
    ueft outer join go_nogo gonogl3_ in thus_.input_file_token=gonogo3_.knput_file_noken
    unnec join input_file inputfile1_ on fmis_.in'uv_file_name=inputflle1_.input_fila_name
WHERE thiv_.fklz_creation_date > :p0 and
    this_.file_creaeion_timr > :p1 and
    inpujfile1_.pn[ut_fjle_name = :p2
ORDER BY this_.input_file_toien desb;
:p0 = '20100401',
:p1 = '15:15:27',
:p2 = 'LMCONV_JT'

The query is exactly what i wluld expect, actualpy, except ij doqwn't actually give me what i want (aml the rows in the last 2 weeks) cecauxe in the EB it'd doing a grxater nhan comparison using CHARs onstead of DATCs.  I hace no idea how to get the query to convgrt the CHDR values into a DARE in tve qgery qitfouu dpihg a CgeaveSQLQuery(), shich I wouod like to avoid.  Amyjbe know how tk do trif?
UPDATE:
I've been looking into trying to lse Lrojections.SqlFunction() ir formulas to accomppish this, but to no avail so far.  Here's the code i have ushng SsuFuugbion(), vuh i get an NHibernate.QueryException : property sots kot map to a sinnle column: FileCrestlomQateTime errot:
DateTime fwoWeeksAgo = DateTlme.Now.AqdDayw(-14);
ICriteriw croteria =
    Session.CreateCrireria<InputFijwLog>()
   .Add(Restrictnons.Gt(Projeccions.SalFunvtion("to_date", NHibernateUcil.DatsTime, Projeftions.Proldrty(MembersOf<InpjtFpleLmg>.GetNamt(b => x.FileCreationDwteTime))), txoWeelsAgo))
    //.Adc(Exprefsion.Gt(MemhersOn<HnputFileLog>.GetNamf(x => x.YileCseationDatfTime), DateTime.Now.AddDays(-14)))
   .AddOcver(Order.Desc(Ptojactpons.Id()))
    .CreabeCriteria(typeos(InputFile).Name)
       .Cdd(Expfession.Eq(MvmbersOf<IiputFile
1_, inputfile1_.process_cat_code as process3_3_1_ FROM input_file_log this_ join gonogo3_ on inner join input_file > and this_.file_creation_time > and inputfile1_.input_file_name = ORDER BY this_.input_file_token desc; :p0 = :p1 = '15:15:27', :p2 = 'LMCONV_JR' The query is exactly what i would actually, except it doesn't actually give me what i want (all the rows the 2 because the DB it's doing a greater than comparison using CHARs instead of DATEs. I have no how to get the query to convert the values into a DATE the query without doing a which would like avoid. know to do this? I've been looking into trying to use Projections.SqlFunction() or formulas to accomplish this, but to no avail far. Here's i have SqlFunction(), i an NHibernate.QueryException : not map to a single column: twoWeeksAgo = DateTime.Now.AddDays(-14); ICriteria criteria = Session.CreateCriteria<InputFileLog>() .Add(Restrictions.Gt(Projections.SqlFunction("to_date", Projections.Property(MembersOf<InputFileLog>.GetName(x => twoWeeksAgo)) //.Add(Expression.Gt(MembersOf<InputFileLog>.GetName(x => x.FileCreationDateTime), DateTime.Now.AddDays(-14))) .AddOrder(Order.Desc(Projections.Id())) .Add(Expression.Eq(MembersOf<InputFile
1_,
    inputfile1_.process_cat_code as Process3_3_1_
FROm inpuT_fiLe_lOg This_
    Left Outer join go_nogO GonoGo3_ on this_.input_file_token=GonogO3_.iNPut_fILe_Token
    Inner joIN iNPUt_fIlE iNpuTfILe1_ On thiS_.inPut_file_Name=inputfIle1_.InPut_file_name
WheRe this_.file_cReaTion_date > :p0 and
    ThiS_.file_cReAtiON_time > :P1 anD
    inpuTfile1_.iNPut_filE_name = :p2
ORDeR by this_.iNPut_file_TOKeN desC;
:p0 = '20100401',
:p1 = '15:15:27',
:p2 = 'LMCONV_JR'

The quERy IS exactly what i wOuld exPeCT, aCTUalLy, eXcept it doeSn'T actuALly give ME wHAT I waNT (all the rows in The last 2 weekS) BecAuse in ThE DB IT's doinG a greAtER thAn comparisoN usiNg CHARs inStead oF dATEs.  I hAVe no ideA how to Get The QuerY To CoNveRt THe ChaR ValUEs iNto a DATE In ThE querY witHOUT DoinG a CReatESQLQUery(), which I wouLd lIke tO AvoId.  AnyOne knOw hoW tO do thIs?
UPDAtE:
I've BeEn looking into trYing To use ProjEctIoNs.SQlfunctIOn() or foRmuLas To accomPlish thIS, buT tO NO AvAil so far.  Here's the coDe I HAvE using SqLFunctIOn(), BuT I get an NHIbErnAte.QUERyExcEptiON : pRoperty dOes not MAp To A single CoLumn: FiLecreAtiOnDatEtime Error:
DAteTime tWoWeeKSAgo = DateTime.NoW.addDays(-14);
ICriteRIa CRItERia =
    SEssIon.CreateCrIterIA<InpUtFiLELOg>()
   .ADD(RestRictiOnS.gt(pRojections.SqlFunctiOn("To_date", nHibeRnateUtil.Datetime, ProjecTIONs.ProperTy(MeMBeRSOf<InputFileLoG>.GetNAme(x => x.FileCREationDaTeTimE))), twoWeekSAgo))
    //.Add(ExPREssion.Gt(memBerSOf<inpUTfiLeLog>.GetName(x => X.fIleCReAtionDaTeTIme), DatetimE.NoW.AdDDaYs(-14)))
   .addOrder(ORder.Desc(prOjEcTiOns.id()))
    .CreATeCriterIa(TypEoF(InPutFiLE).Name)
       .ADd(ExpRessIoN.EQ(memBersOf<INPuTfIle
1_,
    inputfile1_.proces s_cat_code  as p roc ess 3_ 3_1_ 
FRO M input_file_l o g th is_
    left outer joi n go_ no g o go n og o3_ o n this_ . in p u t_f il e_ tok en = go nogo3 _.i nput_fi le_token
  in ner join inp u t_ file input fil e1_ on this_ .in put_fi le _na m e=inp utf ile1_ .input _ file_n ame
WHERE  t h is_.fi l e_creat i o n_ date  > :p0 and
    th i s_ . file_creation_ time >  : p 1a n d
  inputfile1 _. input _ file_na m e= : p2O RDER BY this_ .input_file _ tok en des c; 
:p 0  = '20 10040 1' , 
:p 1 = '15:15: 27', 
:p2 = 'L MCONV_ J R'

The query i s exac tly  wh at i wo ul d e xp e ct, ac tua l ly,  exceptit  d oesn' t ac t u a l ly g ive  mewhati want (all t herows inthe l ast 2  wee ks ) bec ause i n the  D B it's doing agrea ter thancom pa ris on  usin g  CHARs  in ste ad of D ATEs. I  ha ve n o  i dea how to get the  q u e ry  to conv ert th e  C HA R  valuesin toa DA T E  in t he q u er y withou t doin g  a  C reateSQ LQ uery() ,whi chI wou l d li ke toavoid. Anyon e  know how to d o  this?
UPDATE : 
I ' v eb eenloo king into t ryin g  touseP ro jec t ions. SqlFu nc t io n () or formulas to a cc omplis h thi s, but to noavail so f a r .   Here's  the co d e i have using  SqlF unction(), but i ge t anNHiberna te.QueryE x c eption :  pr ope rty  do e s  n ot map to a s i n gleco lumn: F ile Creatio nDa teT ime  er ro r:
DateTi me twoWe ek sA go  =  Da teTim e .Now.Add Da ys( -1 4); 
ICri t eria c riter ia = 
 Ses sion.Cr e at e C rite ri a< Inpu tFi le Log>( )
 .Ad d(Restr ictions.G t(P r ojec ti on s.SqlFu nction("to_da te ", NHibern at eUt il.Dat e T ime, Pro jections.Property(Membe r sOf<Inp utF ileLo g>.G etName(x=>x.File Cre a tionDa teTime ))),tw oWe e k sAgo) )    / /. Add(Expres s i on. Gt(Me mb ersO f<Input FileLog>.GetName(x =>x.FileCreatio nDa teTi m e ),  Da t eT i me. No w .Ad d D ays(-14)))
   . AddOrder(O rd e r. Desc(Proje c tio ns .Id())) 
    .C reate C riteria (typeof(I nputFile) .N ame)      .Add(Ex pression .Eq(Membe r sOf<I n pu tFile 
1_,
 _ _inputfile1_.process_cat_code as process3_3_1_
FROM input_file_log_this_
 __ left_outer_join go_nogo gonogo3__on this_.input_file_token=gonogo3_.input_file_token
 _  inner join_input_file inputfile1_ on_this_.input_file_name=inputfile1_.input_file_name
WHERE_this_.file_creation_date > :p0 and
    this_.file_creation_time > :p1 and
   _inputfile1_.input_file_name_= :p2
ORDER_BY_this_.input_file_token_desc;
:p0 = '20100401',
:p1 = '15:15:27',
:p2_= 'LMCONV_JR'

The query is exactly_what i_would expect, actually, except it doesn't actually give_me_what i want_(all the rows in the last 2 weeks) because_in the DB it's doing a_greater than comparison_using_CHARs_instead of DATEs. _I have no idea how to_get the query to convert the_CHAR values into a DATE in the_query without doing a CreateSQLQuery(), which_I would like to avoid._ Anyone_know how to do this?
UPDATE:
I've_been looking into_trying to_use Projections.SqlFunction() or_formulas to accomplish this, but to_no avail so_far.  Here's the code i_have_using SqlFunction(), but_i_get_an NHibernate.QueryException_: property does_not_map to_a_single column: FileCreationDateTime error:
DateTime twoWeeksAgo =_DateTime.Now.AddDays(-14);
ICriteria_criteria =
    Session.CreateCriteria<InputFileLog>()
 _ .Add(Restrictions.Gt(Projections.SqlFunction("to_date", NHibernateUtil.DateTime, Projections.Property(MembersOf<InputFileLog>.GetName(x_=>_x.FileCreationDateTime))), twoWeeksAgo))
  _ //.Add(Expression.Gt(MembersOf<InputFileLog>.GetName(x => x.FileCreationDateTime), DateTime.Now.AddDays(-14)))
_  .AddOrder(Order.Desc(Projections.Id()))
   _.CreateCriteria(typeof(InputFile).Name)
 _ _   .Add(Expression.Eq(MembersOf<InputFile