I am using mysql_query to insert into a column which is of type datetime. My variable is stored in a char string. I need to put it into the query in a way that it can be inserted: myDate = "98-12-12".........................this is what I have. sprintf (myquery, '%what here? ', myDate); .........need help here mysql_query(&mylink, myquery); Thanks, sb