Connecting Tech Pros Worldwide Help | Site Map

probleum in date datatype format in vb

Familiar Sight
 
Join Date: Jul 2007
Posts: 195
#1: May 6 '08
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
Newbie
 
Join Date: Dec 2006
Posts: 20
#2: May 7 '08

re: probleum in date datatype format in vb


I didn't quite get your problem, show your code
QVeen72's Avatar
Moderator
 
Join Date: Oct 2006
Location: Bangalore
Posts: 1,385
#3: May 7 '08

re: probleum in date datatype format in vb


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
Reply