sql - Out of a set of data returned grouped by months, only the initial month is returning incorrect data -


i trying return data last 24 months of end of last month. initial month returns incorrect data, while other months correct. believe issue in strbegindate = section of code. ideas causing partially returned data initial month? thank much.

sub getstaticapprovalrates_slide6()      dim strbegindate     dim strenddate      strenddate = sheets("instructions").range("enddate").value     strbegindate = dateadd("m", -23, strenddate) + 1      sheets("slide6data").select 

it's hard what's wrong based on posted. see calculating start date based on end date, subtracting months. there no allowance days. might missing of first month not allowing days of first month.

that , if end date occurs mid-month, think algorithm cause start date mid-month also. perhaps missing days 1-x of first month.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -