473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Setting Time property

Hi all,

I have a db that records time in the minutes that have passed midnight.

I need to pull this back and put it into correct time hh:mm

Can anyone help me with setting up the initial time to midnight??

Thanks in Advance,

Simon

Nov 27 '06 #1
3 1314
do you mean format it?

Format(TheReturnedTime, "HH:MM")

Or do you want to add time?

dim d as new date(year, month, day, hour, minute, second)

Then you can add minutes...

d = d.addminutes(NumberOfMinutes)

Or you need the difference in two dates:

dim d as Date = DateDiff(DateInterval, Date1, Date2)

--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"si_owen" <s.****@sstaffs.gov.ukwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
Hi all,

I have a db that records time in the minutes that have passed midnight.

I need to pull this back and put it into correct time hh:mm

Can anyone help me with setting up the initial time to midnight??

Thanks in Advance,

Simon
Nov 27 '06 #2
I want the format to be HH:MM no days month or year just the time and
set to midnight in the code

Nov 27 '06 #3
There is no time class so I would use the date class. You just don't use the
year, month, or day. Only use them to delcare the date, but after that, you
can use the hours, minutes, and seconds.

VB2005:
dim d as date = Today

VB2003:
dim d as date = Now.Today

-----
d will equal December 12, 2006 at midnight.

--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"si_owen" <s.****@sstaffs.gov.ukwrote in message
news:11**********************@l12g2000cwl.googlegr oups.com...
I want the format to be HH:MM no days month or year just the time and
set to midnight in the code
Nov 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MLH | last post by:
A form named frmVehicleEntryForm has a number of textbox controls who's OnGotFocus property setting is an expression... =Change2Green() Change2Green() looks something like this... Dim MyControl...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
11
by: Aaron Queenan | last post by:
Given the classes: class Class { public static implicit operator int(Class c) { return 0; } } class Holder
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
5
by: Alex Glass | last post by:
I have created a winforms application and I designed it with the normal display settings, (96DPI) however, when I set the font settings to 120 DPI, my application text labels look all messed up. ...
4
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
7
by: Ronald S. Cook | last post by:
In a .NET Windows app, if I set somehting like the title of the form to "MyApp" at run-time, will that make the app run slightly slower than if I had set the title at design-time? Thanks, Ron
12
by: info | last post by:
Hi All, I am trying to set the hourglass cursor inside a class that has nothing to do with MainForm class and I don't want to pass a reference to MainForm. How can I set the current cursor to...
41
by: Jim | last post by:
Hi guys, I have an object which represents an "item" in a CMS "component" where an "item" in the most basic form just a field, and a "component" is effectively a table. "item" objects can be...
4
by: Blackbrand | last post by:
I'll start off with what i'm trying to do: i want to search my data programmatically and then jump to the row in the datagrid. My data will almost allways go out of the datagrids bounds so if the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.