Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Any suggestions on how to do this, I am trying to get the number of minutes associated with the time at the moment and then use the Subtract method, don't think that this is the best approach and is going to cause a lot of problems.

 

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)

Posted

DateTime constructor

 

How about this approach:

 

DateTime roundTime = new DateTime(
                        rawTime.Year,
                        rawTime.Month,
                        rawTime.Day,
                        (rawTime.Minute < 30) ? rawTime.Hour : rawTime.Hour + 1,
                        0,
                        0
                    );

 

Good luck :cool:

Never trouble another for what you can do for yourself.

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...