Joined: 11 Feb 2010
Location: Australia
Online Status: Offline
Posts: 1
Topic: range of date Posted: 11 Feb 2010 at 5:00am
hi,
i would like to ask about return data with date as discrete parameter.
i used view for my CR n the parameter {?date} based on invoice_date, for example i take '1/1/2010' in my parameter then the procedure have to shown sales from '31/12/2009' until '1/12/2010'
formula1 : max ==> {?date}-1 min ==> {?date}-30
then procedure to take sales is if invoice_date in {@min} to {@max} then {detil.sales}
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 12 Feb 2010 at 6:16am
I'm not sure that just subtracting 1 will give you the day before, but if it does, they your date range is 12/31/09 to 12/2/09 and NOTHING is in that range.
use DATEADD() and what I thing you want is:
local datevar minDate := DateAdd("d"1,{?date}) //12/31/09;
local datevar maxDate:=DateAdd("m", -1, {?date}); //12/1/09
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum