mike55 Posted November 13, 2007 Posted November 13, 2007 I have a database field, called "hours" which has a float datatype. I am doing a query on the database table and extracting the field along with other fields into a dataset in the App_Code folder. In this dataset I have a datatable which has a column called "hours" and is a System.Decimal datatype. Now in my data entry form, I have a validation statement which ensures that users only put in valid times, i.e. anything over 59 minutes is not allowed. I am attaching the afore mentioned dataset to a crystal report which I am using to display all the data. At the end of the report I am doing a summary operation which Sums all the "hours" data together. The problem that I am having is that the sum operation is treating "hours" as a decimal number, which it is. However, I need to be able to treat it as a time. Any suggestions on how I can change the summary operation. One option suggested would be to break the time down into hours and minutes when the user first submits it, and then use a combination of multiplication, division, addition and subtraction (see: http://diamond.businessobjects.com/node/238). But that is going to get very nasty. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.