Please help, its very urgent ( retrieving datetime )
-
Consider the following: Database name - junkDB Table name - junk Fields - 1) slno char(10) 2) name char(20) 3) message char(200) 4) date_time datetime the 4th field is of type datetime. (eg: 07/20/2004 5:30:45 PM) i am connecting to the database using VC++ (SDK), using the #import (msado15.dll) statement. when i retrieve the date_time field, i get a floating point value (somewhat like this 37842.4578131) can someone help me with this. how can i retrieve the datetime field properly. thankyou, Deep George Zachariah
-
Consider the following: Database name - junkDB Table name - junk Fields - 1) slno char(10) 2) name char(20) 3) message char(200) 4) date_time datetime the 4th field is of type datetime. (eg: 07/20/2004 5:30:45 PM) i am connecting to the database using VC++ (SDK), using the #import (msado15.dll) statement. when i retrieve the date_time field, i get a floating point value (somewhat like this 37842.4578131) can someone help me with this. how can i retrieve the datetime field properly. thankyou, Deep George Zachariah
deep_george_zach wrote: i get a floating point value (somewhat like this 37842.4578131) Possibly the number of days since 1/1/1901
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
-
deep_george_zach wrote: i get a floating point value (somewhat like this 37842.4578131) Possibly the number of days since 1/1/1901
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
-
is there any way to get the datetime directly.... if no, then how do i convert the floating point number into date... any idea ?? thankyou Deep George
Use the Format() method to format it in whatever way you want. Like Format("%Y-%m-%d") formats it to Year, Month and Day format. Format method is member of CTime class.