Hey there,
A quick question here, I would like to filter certain data in my measurement table That data would be based upon data later than a given date. My table has a field that is mDate (A Text Field) and a query I have written looks like that below.
Sub CheckMs2Count
Dim Cursor2, Cur As Cursor
Cursor2 = SQL2.ExecQuery("SELECT measure.Glucose FROM measure inner join users on users.ID = measure.UserID where measure.UserID = " & edtID.Text & _
" AND measure.mDate >= " & edtDte.Text)
If Cursor2.RowCount <> 0 Then
RNum2 = Cursor2.RowCount
MsGlIDList.Initialize
If Cursor2.RowCount > 0 Then
For Rw1 = 0 To RNum2 - 1
Cursor2.Position = Rw1
MsGlIDList.Add(Cursor2.GetDouble("Glucose"))
Next
End If
Cursor2.Close
ToastMessageShow("Records: " & RNum2, True)
End If
Cur = SQL2.ExecQuery("SELECT measure.mDate, measure.mTime FROM measure inner join users on users.ID = measure.UserID where measure.UserID = " & _
edtID.Text & " AND measure.mDate >= " & edtDte.Text)
If Cur.RowCount <> 0 Then
RNumD = Cur.RowCount
MsDATESList.Initialize
If Cur.RowCount > 0 Then
For Rw1 = 0 To RNumD - 1
Cur.Position = Rw1
MsDATESList.Add(Cur.GetString("mDate") & " " & Cur.GetString("mTime"))
Next
End If
Cur.Close
ToastMessageShow("Records: " & RNumD, True)
End If
End Sub
I know that I should probably use one of the functions in the dateutils library but which one3?
Thanks in advance,
Lary
A quick question here, I would like to filter certain data in my measurement table That data would be based upon data later than a given date. My table has a field that is mDate (A Text Field) and a query I have written looks like that below.
Sub CheckMs2Count
Dim Cursor2, Cur As Cursor
Cursor2 = SQL2.ExecQuery("SELECT measure.Glucose FROM measure inner join users on users.ID = measure.UserID where measure.UserID = " & edtID.Text & _
" AND measure.mDate >= " & edtDte.Text)
If Cursor2.RowCount <> 0 Then
RNum2 = Cursor2.RowCount
MsGlIDList.Initialize
If Cursor2.RowCount > 0 Then
For Rw1 = 0 To RNum2 - 1
Cursor2.Position = Rw1
MsGlIDList.Add(Cursor2.GetDouble("Glucose"))
Next
End If
Cursor2.Close
ToastMessageShow("Records: " & RNum2, True)
End If
Cur = SQL2.ExecQuery("SELECT measure.mDate, measure.mTime FROM measure inner join users on users.ID = measure.UserID where measure.UserID = " & _
edtID.Text & " AND measure.mDate >= " & edtDte.Text)
If Cur.RowCount <> 0 Then
RNumD = Cur.RowCount
MsDATESList.Initialize
If Cur.RowCount > 0 Then
For Rw1 = 0 To RNumD - 1
Cur.Position = Rw1
MsDATESList.Add(Cur.GetString("mDate") & " " & Cur.GetString("mTime"))
Next
End If
Cur.Close
ToastMessageShow("Records: " & RNumD, True)
End If
End Sub
I know that I should probably use one of the functions in the dateutils library but which one3?
Thanks in advance,
Lary