You no need to define any additional parameter to your SqlDataSource as you are expecting filter from 1st of the current month to the current date. You can following where clause:
WHERE [OrderDate] BETWEEN (DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()),0)) AND GETDATE()
-Sri
Visit My Blog -------------------------------------------------
If this post was useful to you, please mark it as answer. Thank you!
ksridharbabu...
Star
9239 Points
1356 Posts
Re: Query 'where' between Sysdate and first day of month
Mar 26, 2010 07:18 AM|LINK
Hi,
You no need to define any additional parameter to your SqlDataSource as you are expecting filter from 1st of the current month to the current date. You can following where clause:
WHERE [OrderDate] BETWEEN (DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()),0)) AND GETDATE()
Visit My Blog
-------------------------------------------------
If this post was useful to you, please mark it as answer. Thank you!