Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Date TIme Conversion

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
Millkind
Asked:
Millkind
  • 2
1 Solution
 
lojk.Net and Infrastructure ConsultantCommented:
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
 
MillkindAuthor Commented:
jep just that easy arrrghhhh
0
 
lojk.Net and Infrastructure ConsultantCommented:
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 to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now