I'm trying to get a date search working with MSSQL and for some reason it's not returning any results. I'm not sure if the SQL for MSSQL for date searches should differ from MySQL?
The code I'm trying to use is:
SELECT StartTimeStamp, Duration, CallDirection, ExternalNumber, Filename FROM IpPbxCDR.dbo.CFData
WHERE ExternalNumber = 'xyz' AND StartTimeStamp >= '11-06-01' AND StartTimeStamp <= '11-06-07'
ORDER BY StartTimeStamp DESC
The StartTimeStamp is stored in the DB as YY-MM-DD HH:MM:SS and is the type timestamp. I'm also using PHP so using ADODB to connect (I'm not sure if that makes a difference).
Any suggestions welcome.