By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,816 Members | 2,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,816 IT Pros & Developers. It's quick & easy.

probleum in date datatype format in vb

100+
P: 198
Hi
i made a programe in which i want to calculate the total time from a column
but when i declare a variable having datatype is "date" then the default value in this variable is "12:00:00:
and when the calculation is less than 1 hour just like 38 minutes 56 sec
it creates the probleum and shows like 12:38:56
i searched on net but im not getting a proper idea
can you give me some idea so that this 12 should be replaced in to "00"

please help me
varinder
May 6 '08 #1
Share this Question
Share on Google+
2 Replies


P: 20
I didn't quite get your problem, show your code
May 7 '08 #2

QVeen72
Expert 100+
P: 1,445
Hi,

What is the code you have used for calculation...?
I Guess, you want to find the time elapsed (From your previous thread)

Create a FormLevel variable say Dim MyTime As Date
in Formload:
MyTime = Now

To find the time elapsed:
Label1.Caption = Format(Now - MyDate, "hh:mm:ss")

Regards
Veena
May 7 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.