Solved

Date TIme Conversion

Posted on 2006-06-14
3
242 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
ID: 16905585
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
ID: 16905637
jep just that easy arrrghhhh
0
 
LVL 9

Expert Comment

by:lojk
ID: 16905891
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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