data type time(7) question

elic05

Member
Joined
Nov 2, 2008
Messages
19
Programming Experience
Beginner
i want to write into a table in my sql server database, the current time, only the exact time.

in vb i get the time
VB.NET:
Dim tm As Date = TimeOfDay()

and i add it as a param

VB.NET:
cmd.Parameters.AddWithValue("tm", tm)
        cmd.CommandText = "UPDATE users SET lastCallTime=@tm where ...."

i run the query and
i get an exeption
saying the types are not the same

the lastCallTime datatype is time(7)
how can i get the system time in the same format so i can put it into the table?
 
Back
Top