Hello Vbforums
I'm using SQLite & Vbrichclient I need to query for records for curent month and year.
This is what I did but without success.
For curent month
For curent year
thank you in advance
I'm using SQLite & Vbrichclient I need to query for records for curent month and year.
This is what I did but without success.
For curent month
Code:
strSQL = "Select * from Transac_tbl where MyDate between " & DateSerial(Year(Date), Month(Date), 1) & " and " & DateSerial(Year(Date), Month(Date) + 1, 0)
StrSql = "Select * from Transac_tbl where strftime('%Y %m' , MyDate) between " & DateSerial(Year(Date), Month(Date), 1) & " and " & DateSerial(Year(Date), Month(Date) + 1, 0)
Code:
StrSql = "Select * from Transac_tbl where strftime('%Y',MyDate)= '" & Format(Year(Date), "yyyy")) & "')"