Hi,
I have a DB table that has a TimeStamp column and i need to dispplay that in my DataGridView Controller. When i tried to lead the data of that column, it throws an exception in a data Grid View Deafult error log, and prevents from displaying the time stamp values.. How do i fix this?
TY
How do i convert TimeStamp to DateTime?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Oct 16, 2009, 9:13 PM EDT
binary columns by default in gridview read as image, in your scenario VS tries to convert your binary data (timestamp)
to image so it fails so it throws exception!!
http://connect.microsoft.co/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=93639
By AutoGenereted Columns it Generates ImageColumn For TimeStamp
you need to Manually Add textColumn for TimeStamp Data.. in dataGridView :)
Thank you :)
and please check "do you like this answer" :)
Roei BarRank #1,271 · 1.4K reputationPosted Oct 17, 2009, 1:23 AM EDT
The only way is to use Convert function
select convert(varchar,CAST (0x00000000000067FB as datetime),10)