either that or you can parse the string from the database into a valid date
time object using the static parse method.
--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at
www.lulu.com/owc, Amazon, B&H etc
Forth-coming VSTO.NET
-------------------------------------------------------------------------------
"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:u0**************@TK2MSFTNGP12.phx.gbl...
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:O7**************@TK2MSFTNGP12.phx.gbl...
I use a string sDate to fetch a SmallDateTime field form SQL Server
and the result is :"2005/12/12 ¤W¤È 12:00:00";
How can I get the Date part from the string?
or can I get the Date part from database?
sDate = <ADO.NET object>["sDate"].ToString("dd MMM yyyy");