954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Set date to 0?

Hi there,

How would I go about setting a date/time to 0? Basically I want the time to be 00:00:00 so that when I use the addseconds function of say 120 seconds it reads 00:02:00

Any help would be much appreciated.

dimega
Newbie Poster
2 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

>> How would I go about setting a date/time to 0?
Setting computer date/time??or just on your program?

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

Sorry double post

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

Hi there,

How would I go about setting a date/time to 0? Basically I want the time to be 00:00:00 so that when I use the addseconds function of say 120 seconds it reads 00:02:00

Any help would be much appreciated.


Hi,
I think you want like Stop Watch. Date variables dont take such values, If u set 00:00:00 it automatically changes to 12:00:00 AM.

You can create Your own Date class that implements the desire functionality using class module.

selvaganapathy
Posting Pro
547 posts since Feb 2008
Reputation Points: 44
Solved Threads: 100
 

Hi, thanks for the reply

I wasn't sure about how to create my own date class but in the end I set the label to 00:00:00 and used division and modulus to extract out the hours minutes and seconds and then used concatenate which seems to be working. Is this way of doing it ok?

dimega
Newbie Poster
2 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Ok, You can do extract and Concatenate from string. It is another way to solve your problem

selvaganapathy
Posting Pro
547 posts since Feb 2008
Reputation Points: 44
Solved Threads: 100
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You