i\'m trying to get the Max field where date = today using this code:
Dim todaydate = Format(Today.Date, \"dd/MM/yyyy\") Dim sql1 As String = \"Select
You need to use a single quote instead of hash here, it would be better if you could use string.format as well (instead of manually concatenating)
Dim sql1 As String = String.Format("select max(snum) from tblbill where idate='{0}'",todaydate)