Solved

Date TIme Conversion

Posted on 2006-06-14
3
215 Views
Last Modified: 2010-04-23
I get the date in from a  date time picker.
I want to keep the date and set the time to midnight so that.
bsv = DateDiff(DateInterval.Minute, '''this is bs.value with the time set to 00:00:00''', bs.Value)
will be the number of minutes from midnight of the selected day to the bs.value
0
Comment
Question by:Millkind
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
lojk earned 500 total points
Comment Utility
DateTimePicker1.Value.Date

That what you looking for?

if you want a longer way to do it

 Dim tDate As New Date(DateTimePicker1.Value.Year, DateTimePicker1.Value.Month, DateTimePicker1.Value.Day, 0, 0, 0)
0
 

Author Comment

by:Millkind
Comment Utility
jep just that easy arrrghhhh
0
 
LVL 9

Expert Comment

by:lojk
Comment Utility
the .net framework' completeness is its strength and weakness. It is so difficult sometimes to find the function you need to then realise the next week after struggling with it there was a better quicker easier way to do it...

still the equivalent command in vb6 was several lines long...


thx for points..
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now