Post Author: ksatria
CA Forum: Data Connectivity and SQL
I have a report in access and using the following query:IIf(CDate([MeetingStart])<#12/30/1899 8:0:0# And CDate([MeetingEnd])>#12/30/1899 7:0:0#,"X","") AS am7I believe that it should compare the time. I had transfer it to sql query as:CASE WHEN adm.Sections.MeetingStart < '#12/30/1899 8:0:0#' AND adm.Sections.MeetingEnd > '#12/30/1899 7:0:0#' THEN 'X' ELSE '' END AS am7However, it found out that i does not compare it properly. I wonder if anybody know what i did wrong in this query. What will be the equivalent of CDate? and am i correct with this '#12/30/1899 8:0:0#' in sql?The MeetingStart data type is varchar and the time was written as 7am. I really appreciate your help.