Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys, I need your help. In Java there is a way to get timestamp from a result set object and that is by using the getTimeStamp(). since I am converting to c#, the closest thing to a result set in c# is a data set, or data table. However, neither one of these posses a function similar to the getTimeStamp(). So is there a way I can do that or is there a totally different object I should use?. Thanks for your help
Posted

If this is precise time you need you can use this:
DateTime ticks[^]

If this is some sort of checksum for a given object perhaps you're after
GetHashCode[^]
 
Share this answer
 
As far as the docs say all getTimeStamp does is return the value of the specified column AS a sql.TimeStamp object. The C# equivilent would just cast the value of of the column to the desired type.

A TimeStamp in SQL Server is usually an array of bytes, so.... I don't know what your database uses so it's impossible to tell you exactly what to use.
 
Share this answer
 
Comments
rudolph098 16-Oct-13 10:43am    
Thank you this was very insightful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900