Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix Times in DataGridView 1

Status
Not open for further replies.

Echilon

Programmer
Feb 22, 2007
54
GB
I have a DataGridView which gets data from a DataSet, one of the columns in the DataSet has an integer (a unix timestamp). I need to display the timestamp as a formatted DateTime, but I can't figure out how. I have a static method which converts unix times to DateTimes, but I can't find any examples on how to call the method when setting the value of the cell.
 
before you bind to the datagrid iterate through the dataset and alter the values of the column would be a quick fix.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Rick Cook, The Wizardry Compiled
 
I eventually used the CellFormatting event of the DataGridView.
 
cool, glad you got it sorted.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Rick Cook, The Wizardry Compiled
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top