Hi all,
I am trying to calcuate the difference between two dates, between a date from the database and sysdate(todays date). I am using the below code and I am getting this kind of result. 28.0:00:00:00. How can I just display only 28 and remove the rest. can someone help me here or show me a better way to handle this. thanks
Dim DatDiff As DateTime = dsItem.Tables("ItemDetails").Rows(0).Item("Leet")
Dim DateDif As DateTime = System.DateTime.Now.ToShortDateString
lblDateD.Text = DatDiff.Subtract(DateDif).ToString
I am trying to calcuate the difference between two dates, between a date from the database and sysdate(todays date). I am using the below code and I am getting this kind of result. 28.0:00:00:00. How can I just display only 28 and remove the rest. can someone help me here or show me a better way to handle this. thanks
Dim DatDiff As DateTime = dsItem.Tables("ItemDetails").Rows(0).Item("Leet")
Dim DateDif As DateTime = System.DateTime.Now.ToShortDateString
lblDateD.Text = DatDiff.Subtract(DateDif).ToString