Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a date field [Start Date], and I want to load only records with start date in the most recent 8 months, including current month. For example, for any date in November, I need to load records from Apr. 1st till Nov. 30th. I'm using this expression
"where [Start Date]>=AddMonths (monthend(today()), - 8);" in load script, but I got Mar. 31st loaded. Any idea why?
Thanks
Yvonne
Or try this?
Where [Start Date] >= MonthStart(AddMonths(MonthEnd(Today()), -7))
Here when you do MonthEnd of today you get 11/30/2017 and you are going back 8 months so it is going 30 Apr 2017. As Apr has 31 days when you do >= it pick up 31st too. So try the above expr and see.
May be try like
WHERE [Start Date] > AddMonths (monthend(today()), - 😎
Still has Mar. 31...without "="
Or try this?
Where [Start Date] >= MonthStart(AddMonths(MonthEnd(Today()), -7))
Here when you do MonthEnd of today you get 11/30/2017 and you are going back 8 months so it is going 30 Apr 2017. As Apr has 31 days when you do >= it pick up 31st too. So try the above expr and see.
I just checked yes do not use that expr. Try the one which i posted just now.
Seems to work now. Thanks!