.comment-link {margin-left:.6em;}

Ben Cops

Thursday, April 17, 2008

DateTime format string for inserting into SQL strings directly

To build an insert for a SQL string using datetime literals, the following format string can be used: "yyyy-MM-dd hh:mm:ss"

As in

DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")

0 Comments:

Post a Comment

<< Home