I don't think that what you want to do is possible. I don't believe
there is a syntax for representing a date time as a string in code. You
will have to create a string, and then actually execute code to change it
into a DateTime, as others have indicated.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"msnews.microsoft.com" <da*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hello.
How can I specify datetime by string?
In VB.NET I can write by "#" simbol like this: #10/12/2004 12:00#.
How can I do it in C#?