469,921 Members | 2,152 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,921 developers. It's quick & easy.

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 1211
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by David Lozzi | last post: by
5 posts views Thread by Alex Glass | last post: by
41 posts views Thread by Jim | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.