mandydion
asked on
urgent: vb, convert a string to time format
hi all,
currently i have a string, for example: "20:18:54" , is it a way to convert it into time format/type, so that i can use/insert it into a database where the field is time format. how to write it in vb code? thanks!
mandy
currently i have a string, for example: "20:18:54" , is it a way to convert it into time format/type, so that i can use/insert it into a database where the field is time format. how to write it in vb code? thanks!
mandy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You dont need to convert the string at all - you just need to put in the sql statement correctly:
strsql = "INSERT INTO <table> (<name of field to contain the time>) VALUES ( #" & <variable containing time string> & "#)
Hope it helps