I am pulling in invoice dates from a table in SQL Server 2008. The dates are in Julian. I've converted them using:
CONVERT(char(12), dateadd(dd, (t2.date_paid - 639906), '1/1/1753'), 101)
Great. Now, when I attempt to limit results in the WHERE clause with
AND CONVERT(char(12), dateadd(dd, (t2.date_paid - 639906), '1/1/1753'), 101)
BETWEEN '07/01/2012' AND '07/31/2012'
I receive dates outside of that range. The t2.date_paid
column will return dates from 2004.
Thoughts?