how do I insert a datetimepicker date into sql server from vb.net.
Example of my code , just a piece, where birthdate is the datetimepicker control
this is my code for
cmd1.Parameters.AddWithValue("@Birthdate", birthdate.Value)
and here is the insert into command:
("Insert into [BD_maest].[dbo].[cust] ([Birthdate]) values ('" + birthdate.value + "')", conec)
I'm getting this error when trying to save data: conversion failed when converting date and/or time from character string
Thanks in advance