date - VB.NET Returning sum hours of datetimepicker -


i have select returns column in datagridview called date , time of datetimepicker , column flag "input" or "output". want return result sum of hours of datetimepicker flag "input" , sum flag " ouput ". me guys?

cheers....

but anyway try sum of time in hours or minutes.

dim firstin string = cdate(dtp1.value.date).tostring("hh:mm") 'try or without cdate. dim firstout string = cdate(dtp2.value.date).tostring("hh:mm") 'try or without cdate.  dim elapsedtime timespan = datetime.parse(firstout).subtract(datetime.parse(firstin)) dim elapsedminutestext string = elapsedtime.minutes.tostring() dim elapsedhrstext string = elapsedtime.hours.tostring * 60 dim totalminute string = cint(elapsedminutestext) + cint(elapsedhrstext) 'then try isert txtbox or message box see result. 'but can minutes , total hours of it. 

hope want.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -