Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...