insert DateTime to SQL 2000

  • Thread starter Thread starter Lam
  • Start date Start date
L

Lam

hi
Does anyone know how to insert Date to SQL server 2000?
I used DataTime.Today.ToShortDateString()
it shows up "1/1/1900" in the database
how can I correct that?
also, how can I pull out the date and compare with a new date?

Thanks
 
Hi,

Why not use the DateTime directly?

Use a parameterize query if you need it.

cheers,
 
Back
Top