I am working on an application in which I have two database fields. One is the Date
, and the other is the time of the insertion of the record with data type VARCHAR(10)
.
I need to fill the DataGridView with these fields.
The problem is that I have to fill the time as the elapsed time between those datetimes.
If the record is added at 2010/08/20 18:00:00
.
- if showing the data after 2 minutes then it will show
2 Mins Ago
- if after 2 hrs then
2 Hrs Ago
- if 2 days then
2 Days Ago
.