Forum Discussion
ckattookaran
2 years agoVIP
Depending on where you are running this SQL query, can't you get the year from the user entry and use a loop to build your SQL query like something similar?
dim strUserTime as String
dim intUserYear as integer = Left(strUserTime,4)
dim intUserPriorYear as integer = intUserYear-1
Dim lstTimeList As new List(of String)
For each i = 1 to 12
lstTimeList.Add($"{intUserPriorYear}M{i}")
Next
Now you can then do String.Join(", ", lstTimeList), to get the whole list of time.
- Rithik_Prem2 years agoNew Contributor III
Hi,
I was wondering if you could please elaborate further on the solution you provided.
Related Content
- 11 months ago
- 4 months ago
- 3 years ago
- 3 years ago