Hi,
Out of curiosity, what is the type of TPDateTime ?
what is the type and value of drCurProcess[COL_TPDATETIME] ?
try:
NewProcess.TPDateTime = DateTime.Parse(
drCurProcess[COL_TPDATETIME].ToString() ).ToString("HH/mm/ss");
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Dogmar Hoffman" <it******@itbranch.com> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl...
Thank you very much for the reply.
I have made the change, but now it says that it can not convert an obect
to a string. I do not get this error with:
NewProcess.TPDateTime =
DateTime.Parse(drCurProcess[COL_TPDATETIME].ToString());
just with:
NewProcess.TPDateTime =
DateTime.Parse(drCurProcess[COL_TPDATETIME]).ToString("HH/mm/ss");
Is there a difference in the way that C# treats ToString() for 24 hour
format? Thank you again!
DH
*** Sent via Developersdex http://www.developersdex.com ***