Convert Decimal to Time

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
bani06
User
Posts: 38

Convert Decimal to Time

Post by bani06 »

Hi,

I have decimal value 2.7. I want to convert this to time format which is suppose to 2.42. Have try using

NETT_SORT_TIME1 = 2.7

(rsnew["NETT_SORT_TIME"])= (TimeSpan.FromHours(rsnew["NETT_SORT_TIME1"]));

but it shows error. How it suppose to change the correct time value?


MichaelG
User
Posts: 1095

Post by MichaelG »

Try converting the value to integer first. For example:

int val = ConvertToInt(...);


Post Reply