Solved

Date TIme Conversion

Posted on 2006-06-14
3
235 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 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