Date type to SQL Server 2000 datetime field

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Hi I am trying to add parameters to pass to a stored procedure in SQL
Server 2000, I am stuck on the DateTime field value. What do I need to
do in my application with the Date type field so I can pass its value
successfully to the DateTime field in SQL Server?

Thanks


Nick
 
"'" + MyDateTime.ToString() "'"

or

"'" + MyDateTime.ToShortDateString() + "'"

This works in SQL INSERT statements. You just have to treat it like
text. SQL Server does the rest.
 
Back
Top