Hi @jewel ,
Change the parameterized query statement to the following code.
Dim cmd As New SqlCommand("Select User_Name,User_Type,Time,LoginHistory from tbl_LoginHistory WHERE Time BETWEEN '@d1' and '@d2'", con)
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.