Date Order Issue and Dynamic Dates...
Hi all,
I have 2 quick questions...
Number 1 - Date Order Issue...
I have a field in my database named 'User_JoinDate' and the date is being written in the following format yyyy-mm-dd. For some reason, when the dates are displayed in the chart generated by DWC, they appear in the following order...
Dec 5,2010
Dec 6,2010
Dec 7,2010
Dec 8,2010
Dec 2,2010
Dec 3,2010
Any ideas why the dates are not ordering them self correctly?
Number 2 - Adding dynamic dates to mySQL statement...
Currently my SQL statement looks like this...
WHERE User_JoinDate >= '2010-12-02' AND User_JoinDate <= '2010-12-08' AND User_AccountType = 'free'
How can I write this statement so that the dates are not hard coded? For example... the 'Date From' to be dynamically written to 7 days ago from today's date and the 'To Date' dynamically written to be today's date? Does that make sense?
Any help would be greatly appreciated! Thanks in advance!
Dan