P
pvong
Newbie trying to do this in VB.NET
All I want to do is get the value of the last day of the previous year
selected. Example DropDownList
Value Text
191 01/31/2009
190 12/31/2008
189 11/30/2008
188 10/31/2008
187 09/30/2008
186 08/31/2008
185 07/31/2008
184 06/30/2008
183 05/31/2008
182 04/30/2008
181 03/31/2008
180 02/29/2008
179 01/31/2008
178 12/31/2007
What ever date someone picks, I would like it to go to the 12/31 of the
previous year value. If someone picks 01/31/2009, I would like it to give
me the value of "190" because that would be 12/31/08 which is the previous
year. If someone picks 06/30/2008, I would like to return the value 178
which is 12/31 of the previous year.
I know the logic is Dim the selected value and then do some kind of date
calculation so it will tell me how many months to subtract from my Dim
value, but I just don't know how to do that.
Thanks!
All I want to do is get the value of the last day of the previous year
selected. Example DropDownList
Value Text
191 01/31/2009
190 12/31/2008
189 11/30/2008
188 10/31/2008
187 09/30/2008
186 08/31/2008
185 07/31/2008
184 06/30/2008
183 05/31/2008
182 04/30/2008
181 03/31/2008
180 02/29/2008
179 01/31/2008
178 12/31/2007
What ever date someone picks, I would like it to go to the 12/31 of the
previous year value. If someone picks 01/31/2009, I would like it to give
me the value of "190" because that would be 12/31/08 which is the previous
year. If someone picks 06/30/2008, I would like to return the value 178
which is 12/31 of the previous year.
I know the logic is Dim the selected value and then do some kind of date
calculation so it will tell me how many months to subtract from my Dim
value, but I just don't know how to do that.
Thanks!