Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | thakur80Starting Member
 
 
                                        3 Posts | 
                                            
                                            |  Posted - 2015-04-06 : 11:55:50 
 |  
                                            | Hi there, I am running a query with 2 separate date fields (i.e., when an application is taken and when dislocures were sent out). I need to compare the 2 dates to determine if the disclosures were sent within 3 business days of the application date. I am not very good with dates formula so any help would be greatly appreciated. I started off with the following command: Case when (L2.N_3144 > L2.N_3142) then 'Pass' else 'Fail' end Outcome |  |  
                                    | MichaelJSQLConstraint Violating Yak Guru
 
 
                                    252 Posts | 
                                        
                                          |  Posted - 2015-04-06 : 12:08:27 
 |  
                                          | my mistake -- caseCase when  DATEDIFF(dd,d1,d2) >=3 then 'Pass' else 'Fail' end Outcomeyou can change the operand to > if = to is not in your criteria |  
                                          |  |  |  
                                |  |  |  |