on 07-23-2007 3:44 PM
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.
Post Author: yangster
CA Forum: Data Connectivity and SQL
What database are you working off of?and your formula is just comparing 2 string fields so obviously its not going to behave the way you are expecting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.